Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

FarmSap sells heads of lettuce to customers based on the number of lettuce purchased. The prices follows: If a customer purchases 1-3 lettuce head(s), he

FarmSap sells heads of lettuce to customers based on the number of lettuce purchased. The prices follows:

If a customer purchases 1-3 lettuce head(s), he or she must pay 5$ per head

If a customer purchases 4-9 or 11-19 lettuce heads, he or she must pay 3$ per head.

If a customer purchases a multiple of 10 number of lettuce heads, he or she must pay 2$ per head.

If a customer purchases any other amount, he or she must pay 4$ per head.

Write a script in Thonny that asks the user how many heads of lettuce they are buying and displays the total cost for the purchase.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions