Advertisement
ImSoNoobInProgram

Untitled

Dec 14th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.08 KB | None | 0 0
  1. print("University of San Agustin")
  2. print("Computer Engineering Department")
  3. print ("Fritz John E. Raza")
  4. print ("CpE121")
  5. print ("Decisions with Booelean Operation")
  6.  
  7. print("PRETZELZ SWEETS")
  8. print("The Best Ice Cream and Sandwich in Town!")
  9. print("1 - Sandwich")
  10. print("2 - Ice Cream")
  11. print("0 - Exit")
  12. choice =input("Enter Your Choice")
  13. if (choice == "1"):
  14. name = input ("Sandwich name")
  15. quantity = int(input("Quantity: "))
  16. price = float(input("Price: "))
  17. if(quantity >= 1 and quantity <= 5):
  18. disc = 0
  19. discount = price
  20. totaldiscount = quantity * (price * disc)
  21. total = quantity * discount
  22. print("Sandwich Name:",name)
  23. print("Quantity:",quantity)
  24. print ("price:",price)
  25. print ("No Discount")
  26. print("Total Price:",total)
  27. elif(quantity >= 6 and quantity <= 10):
  28. disc = 0.03
  29. discount = price - (price * disc)
  30. totaldiscount = quantity*(price * disc)
  31. total = quantity * discount
  32. print("Sandwich Name:", name)
  33. print("Quantity:", quantity)
  34. print("price:", price)
  35. print("Total Discount:",totaldiscount)
  36. print("Total Price:",total)
  37. elif (quantity > 10):
  38. disc = 0.05
  39. discount = price - (price * disc)
  40. totaldiscount = quantity * (price * disc)
  41. total = quantity * discount
  42. print("Sandwich Name:", name)
  43. print("Quantity:", quantity)
  44. print("price:", price)
  45. print("Total Discount:", totaldiscount)
  46. print("Total Price:", total)
  47.  
  48.  
  49. if (choice == "2"):
  50. name = input ("Ice cream name")
  51. quantity = int(input("Quantity: "))
  52. price = float(input("Price: "))
  53. if(quantity >= 1 and quantity <= 5) or (price ==80):
  54. disc = 0.01
  55. discount = price - (price * disc)
  56. totaldiscount = quantity * (price * disc)
  57. total = quantity * discount
  58. print("Ice cream name:", name)
  59. print("Quantity:", quantity)
  60. print("price:", price)
  61. print("Total Discount:", totaldiscount)
  62. print("Total Price:", total)
  63. elif(quantity >= 6 and quantity <= 10) or (price ==100):
  64. disc = 0.02
  65. discount = price - (price * disc)
  66. totaldiscount = quantity * (price * disc)
  67. total = quantity * discount
  68. print("Ice cream name:", name)
  69. print("Quantity:", quantity)
  70. print("price:", price)
  71. print("Total Discount:", totaldiscount)
  72. print("Total Price:", total)
  73. print(total)
  74. elif (quantity > 10) and (price ==150):
  75. disc = 0.04
  76. discount = price - (price * disc)
  77. totaldiscount = quantity * (price * disc)
  78. total = quantity * discount
  79. print("Ice cream name:", name)
  80. print("Quantity:", quantity)
  81. print("price:", price)
  82. print("Total Discount:", totaldiscount)
  83. print("Total Price:", total)
  84. choice=input("Continue? Yes or No?")
  85. if (choice =="Yes"):
  86. continue
  87. elif (choice =="No"):
  88. break
  89. else:
  90. exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement