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 totalapricots and apricotsrequested 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 totalapricots is less than
or equal to
Raise a ValueError exception with the message 'Number of apricots requested must be within range' if apricotsrequested
is less than or is greater than totalapricots.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
