#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!
#INPUT print(" Welcome to the CCC Shipping Kiosk - put your package on the scales ") weight = float(input('What is the w
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am