1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marysya12 [62]
2 years ago
9

A customer comes into a grocery store and buys 8 items. Write a PYTHON program that prompts the user for the name of the item AN

D the price of each item, and then simply displays whatever the user typed in on the screen nicely formatted. Some example input might be: Apples 2.10 Hamburger 3.25 Milk 3.49 Sugar 1.99 Bread 1.76 Deli Turkey 7.99 Pickles 3.42 Butter 2.79 Remember - you will be outputting to the screen - so do a screen capture to turn in your output. Also turn in your PYTHON program code.
Computers and Technology
1 answer:
Dmitrij [34]2 years ago
3 0

Answer:

name = []

price = []

for i in range(0,8):

item_name = input('name of item')

item_price = input('price of item')

name.append(item_name)

price.append(item_price)

for i in range(0, 8):

print(name[i], '_____', price[i])

Explanation:

Python code

Using the snippet Given :

Apples 2.10

Hamburger 3.25

Milk 3.49

Sugar 1.99

Bread 1.76

Deli Turkey 7.99

Pickles 3.42

Butter 2.79

name = []

price = []

#name and price are two empty lists

for i in range(0,8):

#Allows users to enter 8 different item and price choices

item_name = input('name of item')

item_price = input('price of item')

#user inputs the various item names and prices

#appends each input to the empty list

name.append(item_name)

price.append(item_price)

for i in range(0, 8):

print(name[i], '_____', price[i])

# this prints the name and prices of each item from the list.

You might be interested in
John works as a sales representative with Northwind Traders. He has to make a presentation to his customers in another town. The
Sphinxa [80]

Answer:

Laptop.

Explanation:

In the following scenario, John works in the company as the sales representative and he creates a presentation for his users who belongs to another town. The following presentation contains 10GB storage and he also modifying his presentation at the time of traveling.

So, It is clear that he is not using the Mainframe, PDA, or any other desktop computer, he will using his Laptop.

8 0
3 years ago
What is the proper way to name the range of cells located in colum A row 3 through colum C row 7?
LenKa [72]

Answer:

it is C

Explanation:

6 0
3 years ago
Read 2 more answers
Select the correct answer.
Phoenix [80]
Data availability is the one related to the server being down.
4 0
2 years ago
Mail merge requires an MS Word document in order to work.<br><br> True<br> False
Kipish [7]

True is correct. Hope it helps


3 0
3 years ago
Read 2 more answers
Explain how electric power and electrical energy are related
AlladinOne [14]

Electric power and electrical energy are related because electrical energy comes from electrical power. If one comes from the other, they are related. Hope this helps!

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is the software called that allows the user to create, access, and manage a database? question 8 options:
    10·1 answer
  • The user documents are stored in _______ format.
    15·1 answer
  • : how can you reduce file size so that files can be sent more efficiently across the internet
    5·1 answer
  • Please answer this correctly the underline drop down menu in the font group contains options to underline
    13·1 answer
  • Give me give me keyboard on this phone please provide nice I can't type where is the keyboard.Give me give me keyboard on this p
    6·2 answers
  • Clusters always occur in multiples of what? <br> A.)10 <br> B.)5<br> C.)2 <br> D.)100
    10·2 answers
  • Based on this information, what is their gross income for six months? Roderick
    10·1 answer
  • At the beginning of Section 5.2, it is stated that multiprogramming and multiprocessing present the same problems, with respect
    8·1 answer
  • Explain the measures put in place in order to maintain each of the element of computer security<br>​
    10·1 answer
  • 9.18 lab: even/odd values in a vector write a program that reads a list of integers, and outputs whether the list contains all e
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!