A grocery store sells apples for $6.00 per kilogram for the first 5 kilograms and $4.00 per kilogram for amounts greater than 5 kilograms. Write a Python program, in a file called apples.py, that asks...

A grocery store sells apples for $6.00 per kilogram for the first 5 kilograms and $4.00 per kilogram for amounts greater than 5 kilograms. Write a Python program, in a file called apples.py, that asks the user for the weight of apples purchased and outputs the amount owing, as well as the change due from the transaction. If the user enters an insufficient amount of money paid, then the program should output the amount left owing.Sample input/output 1:Enter weight of apples (in kg): 5.35You owe $31.40.Enter amount paid: 40You receive $8.60 in change.Sample input/output 2:Enter weight of apples (in kg): 3You owe $18.00.Enter amount paid: 15You owe $3.00 more.
Sep 30, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here