15 Jan PMCA Sunday 16:00 Python Homework 20.01.12.
Write a program using while loop. The program will ask the user to enter an ingredient for pizza. Every time you enter an ingredient, the program will show the message “We will add …. into your pizza.”, until you enter “quit”.
Please enter an ingredient for your pizza: mushroom
We will add mushroom into your pizza.
Please enter an ingredient for your pizza: green pepper
We will add green pepper into your pizza.
Please enter an ingredient for your pizza: cheese
We will add cheese into your pizza.
Please enter an ingredient for your pizza: quit
Write a program for a movie theater using while loop. It will keep asking your age and display the ticket price, until you enter “quit”. It is free if you are less than 3 years old, otherwise if your age is less than 16 years old or over 65 years old the ticket is $10, otherwise the price is $15. After quit the loop, it will show how much money people have paid in total.
How old are you? 10
How old are you? 2
How old are you? 50
How old are you? 67
How old are you? quit
Total money received: $35
Sorry, the comment form is closed at this time.