Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do task 2 only, python, need explanation ans for task 1 # 3 parallel list to store name, country and price fruit_list = ['Apples', 'Black

do task 2 only, python, need explanation

image text in transcribedimage text in transcribed

ans for task 1

# 3 parallel list to store name, country and price fruit_list = ['Apples', 'Black Grapes', 'Lemons', 'Limes', 'Oranges', 'Pineapple', 'Tomato', 'Grapes', 'Pepper','Cucumber'] fruit_origin = ['France', 'Spain', 'Israel', 'Mexico', 'Morocco', 'Costa Rica', 'South Africa', 'France', 'Holland','Germany'] fruit_price = [7.50, 8.50, 12.5, 5.5, 7.5, 8.65, 9.50, 10.55, 11.20, 18.4] # loop 3 times to input the details,add them to the lists for count in range(3): fruit = input('Enter fruit name: ') origin = input('Enter country of origin: ') price = float(input('Enter price: ')) fruit_list.append(fruit) fruit_origin.append(origin) fruit_price.append(price) # loop all the fruits and display print('{: TASK 1 1. Create a list of 10 fruits with a corresponding list for origin and price 2. Ask a user to add 3 more fruits and their origin and price 3. Print the fruits with their origin and price arranged in a column format Example: FRUIT Durian Apple Grapes ORIGIN Thailand USA Australia PRICE 7.50 10.50 32.50 4. Count how many fruits in the list TASK 2 1. Ask a user to order a fruit and then display the name of the fruit ordered, the price and origin 2. Let the user order more than one fruit. Add the fruit into a list. Display the running total everytime a new order is made. 3. Display the fruits ordered and the total amount of the order

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions