diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/math/guess | 15 | ||||
-rw-r--r-- | data/string/hello (renamed from data/string/hello2) | 0 | ||||
-rw-r--r-- | data/string/hello1 | 1 |
3 files changed, 15 insertions, 1 deletions
diff --git a/data/math/guess b/data/math/guess new file mode 100644 index 0000000..97ee098 --- /dev/null +++ b/data/math/guess @@ -0,0 +1,15 @@ +import random +from random import randrange +R = randrange(1,100) + +print "Guess a number between 1 and 100!" +N = input("Enter a number: ") +i=1 +while (N!=R): + if N>R: + print "Too big... try again" + else: + print "Too small.. try again" + N = input("Enter a number: ") + i=i+1 +print "You got it in ", i, "tries" diff --git a/data/string/hello2 b/data/string/hello index bb52fc2..bb52fc2 100644 --- a/data/string/hello2 +++ b/data/string/hello diff --git a/data/string/hello1 b/data/string/hello1 deleted file mode 100644 index fc83ab2..0000000 --- a/data/string/hello1 +++ /dev/null @@ -1 +0,0 @@ -print "Hello everyone!" |