Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Use a comment with your full name and student ID. 2. Create a list info[] with your full name and student ID as

1. Use a comment with your full name and student ID. 2. Create a list info[] with your full name and student

1. Use a comment with your full name and student ID. 2. Create a list info[] with your full name and student ID as its elements. 3. Create 2 lists named prices[] and items[]. 4. Using a loop, will ask the user to enter the prices for 3 purchased products one at a time and place them in the prices[] list. 5. Using a loop, will ask the user to enter the number of items of each purchased product, one at a time and place them in the items[] list. Only valid numbers can be accepted. 6. Using loops, it will populate a list with the total cost of each product. 7. After all data has been received and produced, displays your full name and student ID in two lines. It then displays the user entered items and prices, using the data in the lists. It finally displays each item, its price and total cost as shown in the sample run. Please enter the price for item 1: 2.49 Please enter the price for item 2: 10.69 Please enter the price for item 3: 75.90 8. The output should be similar to the sample run, with the proper spacing 1 mark and formatting. Total: Sample run: Petros Passas 123-456-789 2 marks Prices: [2.49, 10.69, 75.9] Items: [2, 5, 10] 2 marks 2 items at $2.49 ==> = $4.98 5 items at $10.69 ==> = $53.45 10 items at $75.90 ==> = $759.00 2 marks 3 marks Please enter the number of items purchased for procuct 1: 2 Please enter the number of items purchased for procuct 2: -5 You entered an invalid number. Please try again. Please enter the number of items purchased for procuct 2: 5 Please enter the number of items purchased for procuct 3: 10 10 marks

Step by Step Solution

3.48 Rating (168 Votes )

There are 3 Steps involved in it

Step: 1

PYTHON PROGRAM store name and id into ... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Focus on the interview.

Answered: 1 week ago

Question

Calculate the missing quantities four-figure accuracy.

Answered: 1 week ago

Question

Calculate the missing quantities four-figure accuracy.

Answered: 1 week ago