Question: i need help with this problem. I am lost on the coding in some spots. program that asks for names and some attribute of the

i need help with this problem. I am lost on the coding in some spots.

program that asks for names and some attribute of the item (see below). Use a WHILE loop to continue to get input. When the user is finished entering information, display some arithmetic information about what they entered.

Lets say i wanted to use different sports as a category, can i use the list function to make a list of sport types and then use elifs to create a ttributes for each? Also, i have to keep track of the input so i can perform arithmetic at the end. Please help

here is an example:

Enter a fruit: apple

What color is it (R)ed, (Y)ellow, (O)ther? R

Do you want to add more (Y/N)? Y

Enter a fruit: banana

What color is it (R)ed, (Y)ellow, (O)ther? Y

Do you want to add more (Y/N)? Y

Enter a fruit: cherry

What color is it (R)ed, (Y)ellow, (O)ther? R

Do you want to add more (Y/N)? Y

Enter a fruit: grape

What color is it (R)ed, (Y)ellow, (O)ther? O

Do you want to add more (Y/N)? N

You entered 4 altogether.

There were 2 red fruits.

There were 1 yellow fruits.

There were 1 fruits that were neither red nor yellow.

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