second day of python challenges

This commit is contained in:
abd.shallal
2019-07-17 16:43:09 +03:00
parent 9b7ec09d50
commit b29d889e05
339 changed files with 107042 additions and 89 deletions

View File

@@ -0,0 +1,11 @@
direction = str(input('Enter direction? up|down : '))
if direction.lower() == 'up':
top = int(input("Please enter top number to start count todow!"))
for i in range(0, top+1):
print(i)
elif direction.lower() == 'down':
below = int(input('Please enter number below 20!'))
for i in range(20, below-1, -1):
print(i)
else:
print('I don\'t understand')

View File

@@ -0,0 +1,7 @@
people = int(input('Please enter number of people want to invite to party : '))
if people < 10:
for i in range(0, people):
name = str(input('Please enter name : '))
print('{0} has been invited'.format(name))
else:
print('Too many people')