Question: Python Script fruits = ( apples , bananas, bananas, bananas, oranges, pears ) Use a tuple method to count the number of times the bananas
Python Script
fruits apples bananas, bananas, bananas, oranges, pears
Use a tuple method to count the number of times the bananas element appears in the tuple fruits, and assign it to a variable, favorite.
Use a tuple method to calculate the length of the tuple fruits, and assign it to a variable, amount.
If the number of times the coupe element appears in the tuple fruits is more than print "Too many bananas in the pantry." to the terminal. If not, print "You are all set with fruits." to the terminal.
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
