Question: Integers total _ apricots and apricots _ requested are read from input, representing the number of apricots available and the number of apricots a customer

Integers total_apricots and apricots_requested are read from input, representing the number of apricots available and the number
of apricots a customer wants to buy. In the try block:
Raise a ValueError exception with the message 'Number of apricots available must be positive' if total_apricots is less than
or equal to 0.
Raise a ValueError exception with the message 'Number of apricots requested must be within range' if apricots_requested
is less than 0 or is greater than total_apricots.
Integers total _ apricots and apricots _

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!