Advertisement
Guest User

while

a guest
Jan 21st, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. # 7-4
  2. prompt='\nEnter the supplement and i will add it to your pizza'
  3. prompt+= '\nor enter Quit and i close this program '
  4. active = True
  5. while True:
  6. message=input(prompt)
  7. if message == 'quit':
  8. break
  9. else:
  10. print(message + ' added to your pizza')'''
  11. #7-5
  12. '''import time
  13. prompt='\nEnter your age '
  14. while True:
  15. age = input(prompt)
  16. age = int(age)
  17. if age >=0 and age <=3:
  18. print('your ticket is free')
  19. elif age > 3 and age <=12:
  20. print('your ticket is worth 10$')
  21. else:
  22. print('your ticket is worth 15$')
  23. time.sleep(60)'''
  24. #7-6-1
  25. '''import time
  26. prompt='\nEnter your age '
  27. prompt2='\nEnter dad`s age '
  28. age = ''
  29. zavershenie=0
  30. while zavershenie==0:
  31. age = input(prompt)
  32. age = int(age)
  33. if age >=0 and age <=3:
  34. print('your ticket is free')
  35. print('where are your parents?')
  36. zavershenie = 0
  37. age = input(prompt2)
  38. age = int(age)
  39. if age >= 18:
  40. print('your ticket is worth 15$')
  41. else:
  42. print('your dad is pedofil')
  43. zavershenie = 1
  44. elif age > 3 and age <=12:
  45. print('your ticket is worth 10$')
  46. zavershenie = 1
  47. else:
  48. print('your ticket is worth 15$')
  49. zavershenie = 1
  50. time.sleep(10)'''
  51. #7-6-2
  52. '''import time
  53. prompt='\nEnter your age '
  54. active = True
  55. while active:
  56. age = input(prompt)
  57. age = int(age)
  58. if age >=0 and age <=3:
  59. print('your ticket is free')
  60. active = False
  61. elif age > 3 and age <=12:
  62. print('your ticket is worth 10$')
  63. active = False
  64. else:
  65. print('your ticket is worth 15$')
  66. active = False
  67. time.sleep(60)'''
  68. # 7-6-3
  69. '''import time
  70. prompt='\nEnter your age '
  71. prompt+='\nor enter quit '
  72. age = ''
  73. while age != 'quit':
  74. age = input(prompt)
  75. age = int(age)
  76. if age >=0 and age <=3:
  77. print('your ticket is free')
  78. elif age > 3 and age <=12:
  79. print('your ticket is worth 10$')
  80. elif age > 12 and age <120:
  81. print('your ticket is worth 15$')
  82. if age == 'quit':
  83. break
  84.  
  85. time.sleep(60)'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement