diff --git a/exer_001.py b/exer_001.py index 0a225af..f18c84d 100644 --- a/exer_001.py +++ b/exer_001.py @@ -12,8 +12,18 @@ """ # your name and email address here -__author__ = 'xXLXx ' +__author__ = 'xXLXx ' if __name__ == '__main__': - # your code here \ No newline at end of file + x = input() + if x < 60 or x > 100: + print "Invalid Value" + elif x in range(60, 75): + print "Derp!" + elif x in range(75, 85): + print "Good" + elif x in range(85, 95): + print "Very Good" + elif x in range(95, 101): + print "Level Asian!" \ No newline at end of file diff --git a/exer_002.py b/exer_002.py index e3bd602..0d62cf4 100644 --- a/exer_002.py +++ b/exer_002.py @@ -8,8 +8,11 @@ """ # your name and email address here -__author__ = 'xXLXx ' +__author__ = 'xXLXx ' if __name__ == '__main__': - # your code here \ No newline at end of file + mods = [x for x in range(0,100) if x % 7 == 0] + print(mods) + # for x in range(0,100,7): + # print x \ No newline at end of file diff --git a/exer_003.py b/exer_003.py index 3072053..4e17c3e 100644 --- a/exer_003.py +++ b/exer_003.py @@ -18,8 +18,9 @@ # your name and email address here -__author__ = 'xXLXx ' +__author__ = 'xXLXx ' if __name__ == '__main__': - # your code here \ No newline at end of file + x = raw_input().replace(' ','').split(',') + print ','.join(sorted(x)) \ No newline at end of file diff --git a/exer_004.py b/exer_004.py new file mode 100644 index 0000000..2058ff3 --- /dev/null +++ b/exer_004.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +""" +Exercise #4 + +Write a program that prints out the square of the first 20 integers +in a block such that the block has a dimension of 4x5. + + 1 4 9 16 + 25 36 49 64 + 81 100 121 144 +169 196 225 256 +289 324 361 400 +""" + + +# your name and email address here +__author__ = 'xXLXx ' + + +if __name__ == '__main__': + # your code here \ No newline at end of file diff --git a/exer_005.py b/exer_005.py new file mode 100644 index 0000000..2ceb2a0 --- /dev/null +++ b/exer_005.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +""" +Exercise #5: + +a program which determines whether the input string +is a palindrome or not. +(Disregard spaces) + +Example: + +Enter a string: This is a sample string. +>> False + +Enter a string: Rats live on no evil star +>> True +""" + + +# your name and email address here +__author__ = 'xXLXx ' + + +if __name__ == '__main__': + # your code here \ No newline at end of file