Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
You sell strawberries. Ask once for the cost (float). Then ask how much money the customer gives you.
No sale and ask again for a new amount (keep going until they pay enough).Thank you for your payment.Your change is: $X where X is rounded to 1 decimal place (use round(..., 1)).Use a loop, and if / elif / else as needed.
Skills: while, floats, round.