Gallery
Solution Pizza Planet
Share
Explore
Solution Pizza Planet

icon picker
Solution

At the right hand side is the the task, starter code and code clips that pupils got.
Below is a link to the solution. You can right click open on replit to demo the answer to pupils and talk through the code. ​
Incase it doesn’t load above here is the link ​
import time
# start your program below
# prompt user and store input values

# ask for and store name of pizza
pizza = input("Please enter the type of pizza: ")

# ask for and store number of slices
slices = int(input("Please enter the number of slices you want: "))

# ask for and store the cost of pizza
cost = float(input("Please enter the pizza price: "))

# display outputs

# display thank you
print('We are processing your order...') # with a new line

# pauses program for 3 seconds
time.sleep(3)
# clears the screen
print('\033[H\033[2J')

# displays a blank line
print('\n\n')

# displays ordered accepted notice
print('Pizza Planet - Order Accepted') # with a new line
print('-----------------------------') # with a new line

# displays a blank line
print('\n')

# displays order details
print('You will pay £' + str(cost) + ' for ' + str(slices) + ' slices of ' + pizza + ' pizza') # with a new line

# displays a blank line
print('\n')
# displays ordered accepted notice
print('It will be with you shortly.') # with a new line
print('Thank you for your order.') # with a new line



Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.