second day of python challenges
This commit is contained in:
11
challenges35-44/challenge-043.py
Normal file
11
challenges35-44/challenge-043.py
Normal 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')
|
7
challenges35-44/challenge-044.py
Normal file
7
challenges35-44/challenge-044.py
Normal 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')
|
Reference in New Issue
Block a user