Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A shipping company charges the following rates Weight of package Rate per kg $1.50 2kg or less more than 2kg but not more than 6kg
A shipping company charges the following rates Weight of package Rate per kg $1.50 2kg or less more than 2kg but not more than 6kg |$2.50 more than 6kg but not more than 10kg $3.25 more than 10kg $4.00 15% tax is also added to each shipment. Payment can be made by debit or credit card. For credit card payments an additional 2% (of the subtotal, ie. the total before tax) is charged (there is no tax on this additional 2%). write a Python program, in a file called shipment. py, to request the following input from the user and output the subtotal and total amount due Number of packages to be shipped Weight of each package (each package can be a different weight) Method of payment (D for debit, C for credit) Sample input/output: How many packages are to be shipped?: 4 Enter weight for package 1: 1.3 Enter weight for package 2: 1.5 Enter weight for package 3: 2.9 Enter weight for package 4: 8.6 How are you paying? (D)ebit or (C)redit? D Your subtotal is $39.40 Your total is $45.31
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started