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]
3 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]3 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
Which popular file format loses some of the information from the image? JPEG TIFF RAW NEF
lisov135 [29]

Answer:

The popular file format that loses some of the information from the image is JPEG

Explanation:

4 0
3 years ago
someone who wants the credentials of skilled training, but in less time that a four -year degree should consider
lubasha [3.4K]

Answer:

An associates degree

Explanation:

5 0
3 years ago
Match the following tasks with their appropriate timing.
Oliga [24]

Answer:

3. 1. 2. daily, weekly, monthly

Explanation:

8 0
3 years ago
Technology has proliferated in Kenya and Somaliland, with text messages used to replace cash, creating mobile money use that, on
Veronika [31]
Well I there’s bitcoins that people do use through phones... but the answer is false
3 0
3 years ago
Write a program to provide information on the height of a ball thrown straight up into the air. The program should request as in
Ymorist [56]

Answer:

The height of the ball after t seconds is h + vt - 16t 2 feet:

def main():

getInput()

def getInput():

h = int(input("Enter the initial height of the ball: ")) # Adding the int keyword before input() function

v = int(input("Enter the initial velocity of the ball: ")) # Same as above

isValid(h,v)

def isValid(h,v):

if ((h <= 0) or (v <= 0)):

print("Please enter positive values")

getInput()

else:

maxHeight(h,v)

def maxHeight(h,v):

t = (v/32)

maxH = (h + (v*h) - (16*t*t))

print ("\nMax Height of the Ball is: " + str(maxH) + " feet")

ballTime(h, v)

def ballTime(h,v):

t = 0

ballHeight = (h + (v*t) - (16*t*t))

while (ballHeight >= 0):

t += 0.1

ballHeight = (h + (v*t) - (16*t*t))

print ("\nThe ball will hit the ground approximately after " + str(t) + " seconds")

# Driver Code

main()

7 0
3 years ago
Read 2 more answers
Other questions:
  • Physical access, security bypass, and eavesdropping are examples of how access controls can be ________.
    15·1 answer
  • Survey Q. Non-scoring: What role is played in the team? (1 correct answer)
    14·1 answer
  • Why was the internet originally constructed
    5·1 answer
  • Every chart has a corresponding ____ that contains the numerical data displayed by the chart.
    6·1 answer
  • You will be given a value of n and k, one line each. You will write a program that determines the minimum number of probe attemp
    9·1 answer
  • Which tabs are expandable and collapsible? This would be in word 2010
    6·1 answer
  • Why is it a good idea to defrag your hard disk regularly?
    9·1 answer
  • Agile methods typically use a ______ model, which represents a series of iterations, or revisions, which are based on user feedb
    7·1 answer
  • How can a user remove or delete a Pivot Table?
    8·1 answer
  • For robot arms the first three axes are called
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!