Question: If num _ bananas is less than 3 , then output 'num _ bananas is less than the required amount to purchase. ' If num

If num_bananas is less than 3, then output 'num_bananas is less than the required amount to purchase.'
If num_bananas is greater than or equal to 3, then assign total_cost with the product of num_bananas and 3.
If total_cost is less than or equal to dollar_amount, then output 'Bananas successfully purchased.'
Otherwise, output 'Not enough money to buy all.'
If dollar_amount is greater than or equal to 3, then output 'At least one item was purchased.'
Click here for examples
num_bananas =(input())
dollar_amount = int input ()
 If num_bananas is less than 3, then output 'num_bananas is less

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 Databases Questions!