Created
January 24, 2015 02:57
-
-
Save cwake/34e7f80bf0701ed1455f to your computer and use it in GitHub Desktop.
Adds all numbers 1 to 100
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#1to100 | |
def onetohundred(): | |
sum = 0 ; | |
for i in range( 1 , 100): | |
sum= sum + i; | |
print("Print the sum of all numbers 1 to 100:",sum); | |
onetohundred() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment