Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 7-4
- prompt='\nEnter the supplement and i will add it to your pizza'
- prompt+= '\nor enter Quit and i close this program '
- active = True
- while True:
- message=input(prompt)
- if message == 'quit':
- break
- else:
- print(message + ' added to your pizza')'''
- #7-5
- '''import time
- prompt='\nEnter your age '
- while True:
- age = input(prompt)
- age = int(age)
- if age >=0 and age <=3:
- print('your ticket is free')
- elif age > 3 and age <=12:
- print('your ticket is worth 10$')
- else:
- print('your ticket is worth 15$')
- time.sleep(60)'''
- #7-6-1
- '''import time
- prompt='\nEnter your age '
- prompt2='\nEnter dad`s age '
- age = ''
- zavershenie=0
- while zavershenie==0:
- age = input(prompt)
- age = int(age)
- if age >=0 and age <=3:
- print('your ticket is free')
- print('where are your parents?')
- zavershenie = 0
- age = input(prompt2)
- age = int(age)
- if age >= 18:
- print('your ticket is worth 15$')
- else:
- print('your dad is pedofil')
- zavershenie = 1
- elif age > 3 and age <=12:
- print('your ticket is worth 10$')
- zavershenie = 1
- else:
- print('your ticket is worth 15$')
- zavershenie = 1
- time.sleep(10)'''
- #7-6-2
- '''import time
- prompt='\nEnter your age '
- active = True
- while active:
- age = input(prompt)
- age = int(age)
- if age >=0 and age <=3:
- print('your ticket is free')
- active = False
- elif age > 3 and age <=12:
- print('your ticket is worth 10$')
- active = False
- else:
- print('your ticket is worth 15$')
- active = False
- time.sleep(60)'''
- # 7-6-3
- '''import time
- prompt='\nEnter your age '
- prompt+='\nor enter quit '
- age = ''
- while age != 'quit':
- age = input(prompt)
- age = int(age)
- if age >=0 and age <=3:
- print('your ticket is free')
- elif age > 3 and age <=12:
- print('your ticket is worth 10$')
- elif age > 12 and age <120:
- print('your ticket is worth 15$')
- if age == 'quit':
- break
- time.sleep(60)'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement