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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply