Page 1 of 1

#INPUT print(" Welcome to the CCC Shipping Kiosk - put your package on the scales ") weight = float(input('What is the w

Posted: Wed Mar 30, 2022 9:21 am
by answerhappygod
#INPUT
print(" Welcome to the CCC Shipping Kiosk - put your package on the
scales ")
weight = float(input('What is the weight of your package?:
'))
#PROCESS - determine rate basaed on weight, calculate fee
if weight <= 2.0: # compare to lowest tier rate
rate = 1.5
elif weight <= 6.0:
rate = 1.8
elif weight <= 10.0:
rate = 1.6
else: #must be greater than 10.0
rate = 1.75
shipping = weight * rate # calculate the shipping fee
#OUTPUT -- use f' formatting
print(f' Your package shipping fee is ${shipping: .2f}')
How do I make this process loop over and over again? And how do
I make it how I can choose how many times it loops? In python
please thankyou!