3rd day of python challenges 51-59

This commit is contained in:
abd.shallal
2019-07-18 12:44:06 +03:00
parent b29d889e05
commit f132554039
11 changed files with 271 additions and 419 deletions

View File

@@ -0,0 +1,12 @@
number = 10
while number > 0:
print('There are {0} green bottles hanging in the wall'.format(number))
print('and if 1 green bottle should accidentally fall')
number = number - 1
answer = int(input('How many green bottles will be hanging on the wall?'))
if answer == number:
print('There will be {0} green bottles hanging on the wall')
else:
while answer != number:
answer = int(input('No, try again : '))
print('There are no more green bottles hanging on the wall')