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 AND 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.

Answers

Answer 1

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.

A Customer Comes Into A Grocery Store And Buys 8 Items. Write A PYTHON Program That Prompts The User

Related Questions

Consider the following method.


public int locate(String str, String oneLetter)

{
int j = 0;
while(j < str.length() && str.substring(j, j+1).compareTo*oneLetter < 0)
{
j++;
}
return j;
}

Which of the following must be true when the while loop terminates?

a. j == str.length()
b. str.substring(j, j+1) >= 0
c. j <= str.length() || str.substring(j, j+1).compareTo(oneLetter) > 0
d. j == str.length() || str.substring(j, j+1).compareTo(oneLetter) >= 0
e. j == str.length() && str.substring(j, j+1).compareTo(oneLetter) >= 0

Answers

Answer:

All

Explanation:

From the available options given in the question, once the while loop terminates any of the provided answers could be correct. This is because the arguments passed to the while loop indicate two different argument which both have to be true in order for the loop to continue. All of the provided options have either one or both of the arguments as false which would break the while loop. Even options a. and b. are included because both would indicate a false statement.

What is media framing?

Answers

Answer:

media frame all news items by specific values, facts, and other considerations, and endowing them with greater apparent for making related judgments

Explanation:

most of the answers for this test is wrong.

Answers

Answer: C, Showing professional behavior.

Explanation:

What is the relationship between an object and class in an OOP program?


The object contains classes.

The object and class are the same thing.

The object is used to create a class.

The object in a program is called a class.

Answers

Answer:

D. The object in a program is called a class.

Explanation:

Java is a object oriented and class-based programming language. It was developed by Sun Microsystems on the 23rd of May, 1995. Java was designed by a software engineer called James Gosling and it is originally owned by Oracle.

In object-oriented programming (OOP) language, an object class represents the superclass of every other classes when using a programming language such as Java. The superclass is more or less like a general class in an inheritance hierarchy. Thus, a subclass can inherit the variables or methods of the superclass.

Basically, all instance variables that have been used or declared in any superclass would be present in its subclass object.

Hence, the relationship between an object and class in an OOP program is that the object in a program is called a class.

For example, if you declare a class named dog, the objects would include barking, color, size, breed, age, etc. because they are an instance of a class and as such would execute a method defined in the class.

During TCP/IP communications between two network hosts, information is encapsulated on the sending host and decapsulated on the receiving host using the OSI model. Match the information format with the appropriate layer of the OSI model.

a. Packets
b. Segments
c. Bits
d. Frames

1. Session Layer
2. Transport Layer
3. Network Layer
4. Data Link Layer
5. Physical Layer

Answers

Answer:

a. Packets - Network layer

b. Segments - Transport layer

c. Bits - Physical layer

d. Frames - Data link layer

Explanation:

When TCP/IP protocols are used for communication between two network hosts, there is a process of coding and decoding also called encapsulation and decapsulation.

This ensures the information is not accessible by other parties except the two hosts involved.

Operating Systems Interconnected model (OSI) is used to standardise communication in a computing system.

There are 7 layers used in the OSI model:

1. Session Layer

2. Transport Layer

3. Network Layer

4. Data Link Layer

5. Physical Layer

6. Presentation layer

7. Application layer

The information formats given are matched as

a. Packets - Network layer

b. Segments - Transport layer

c. Bits - Physical layer

d. Frames - Data link layer

Mark is a stockbroker in New York City. He recently asked you to develop a program for his company. He is looking for a program that will calculate how much each person will pay for stocks. The amount that the user will pay is based on:


The number of stocks the Person wants * The current stock price * 20% commission rate.


He hopes that the program will show the customer’s name, the Stock name, and the final cost.


The Program will need to do the following:


Take in the customer’s name.

Take in the stock name.

Take in the number of stocks the customer wants to buy.

Take in the current stock price.

Calculate and display the amount that each user will pay.

A good example of output would be:

May Lou
you wish to buy stocks from APPL
the final cost is $2698.90

Answers

ok sorry i cant help u with this

when you look directly at a camera lens, it may seen like there is only one lens, but entering light actually passes through a series of lenses, or_____, that bend the light and send it on its way to be focused on the film or digital. chip

Frame
Optics
Flash
SD cARD

Answers

Answer:

The answer should be optics...

Explanation:

If aa person is known to have look at a camera lens straight and light passes via a number of lenses, or Optics.

What is Optics?

This is known to be an aspect  of physics that looks at the attributes and properties of light, such as its relationship with matter, etc.

Therefore,  If a person is known to have look at a camera lens straight and light passes via a number of lenses, or Optics.

Learn more about Optics from

https://brainly.com/question/18300677

#SPJ9

Consider an entity set Person, with attributes social security number (ssn), name, nickname, address, and date of birth(dob). Assume that the following business rules hold: (1) no two persons have the same ssn; (2) no two persons have he same combination of name, address and dob. Further, assume that all persons have an ssn, a name and a dob, but that some persons might not have a nickname nor an address.
A) List all candidate keys and all their corresponding superkeys for this relation.
B) Write an appropriate create table statement that defines this entity set.

Answers

Answer:

[tex]\pi[/tex]

Explanation:

The Fast as Light Shipping company charges the following rates. Weight of the item being sent Rate per 100 Miles shipped 2kg or less. $0.25 Over than 2 kg but not more than 10 kg $0.30 Over 10 kg but not more than 20 kg. $0.45 Over 20 kg, but less than 50kg. $1.75 Write a program that asks for the weight of the package, and the distance to be sent. And then displays the charge.

Answers

Answer:

weight = float(input("Enter the weight of the package: "))

distance = float(input("Enter the distance to be sent: "))

weight_charge = 0

if weight <= 2:

   weight_charge = 0.25

elif 2 < weight <= 10:

   weight_charge = 0.3

elif 10 < weight <= 20:

   weight_charge = 0.45

elif 20 < weight <= 50:

   weight_charge = 1.75

if int(distance / 100) == distance / 100:

  d = int(distance / 100)

else:

   d = int(distance / 100) + 1

   

total_charge = d * weight_charge

print("The charge is $", total_charge)

Explanation:

*The code is in Python.

Ask the user to enter the weight and distance

Check the weight to calculate the weight_cost for 100 miles. If it is smaller than or equal to 2, set the weight_charge as 0.25. If it is greater than 2 and smaller than or equal to 10, set the weight_charge as 0.3. If it is greater than 10 and smaller than or equal to 20, set the weight_charge as 0.45. If it is greater than 20 and smaller than or equal to 50, set the weight_charge as 1.75

Since those charges are per 100 miles, you need to consider the distance to find the total_charge. If the int(distance / 100) is equal to (distance / 100), you set the d as int(distance / 100). Otherwise, you set the d as int(distance / 100) + 1. For example, if the distance is 400 miles, you need to multiply the weight_charge by 4, int(400/100) = 4. However, if the distance is 410, you get the int(400/100) = 4, and then add 1 to the d for the extra 10 miles.

Calculate the total_charge, multiply d by weight_charge

Print the total_charge

Other Questions
WILL GIVE BRAINLEST!What is Logical evidence? *Evidence: based on personal experience and often in the form of brief narratives or storiesEvidence based on observable scientific research - such as studies and statistics.Evidence based on sound logic and reasoning.Other:( If other please answer with (a) complete sentence(s) ) simplify - 2/3x + 6 + 1/5y -1/4x -3/10 y +3 pleasee help asap i dont have much time worth 10 points Sum of two numbers = 15 (Addition)Difference of two numbers =3 (Subtraction)Find the two numbers.What is the product of those two numbers? (Multiplication) According to Newton's law of universal gravitation, which statements are true?As we move to higher altitudes, the force of gravity on us decreases.O As we move to higher altitudes, the force of gravity on us increases,O As we gain mass, the force of gravity on us decreases.O Aswe gain mass, the force of gravity on us increases.DAs we move faster, the force of gravity on us increases. The distribution of 4 in the following expression (5+s)4 The total amount of carbon dioxide in the atmosphere is estimated to have decreased by 10 to 15 percent since 1900.True False Which of the following is a mixture?a airbironChydrogend nickel (GIVING BRAINLIEST!!)How does condensation occur?A) Water vapor rises from Earth's surface into the sky.B) Water vapor cools and forms water droplets in clouds.C) Water droplets fall to the ground from the sky.D) Water runs across Earth's surface.Explain why 21+15a distributive property equavilent expression How does the body provide energy when a person is jogging for half an hour?It uses oxygen to convert carbohydrate and fat into glucose.It uses the glycogen that is stored in the muscles and liver.It uses brain synapses to override muscle fatigue signals.It uses sugar in the blood to generate a high-energy fuel. How do you do these question and what's the answer?-1/3 (n + 15) = -246 = -6t -8Urgent. Please answer ASAP. Thanks guys! Give 5 Examples of Linear Equation in Two Variables Help me. I'll mark brainiest How did Mendeleev arrange the elements in the first periodic table?A. In order of increasing melting points and densities.B. In order of increasing atomic mass.C. In order of decreasing atomic mass.D. In order of increasing atomic number. The following cost data relate to the manufacturing activities of Black Diamond Ski Company during 2013: Manufacturing Overhead Costs: Property taxes, factory $ 3,000 Utilities, factory $ 5,000 Indirect labor $10,000 Depreciation, factory $24,000 Insurance, factory $ 6,000 Total Actual Manufacturing OH Costs $48,000 Other Costs Incurred: Purchases of raw materials $32,000 Direct labor costs $40,000 The Black Diamond Ski Company used 10,200 machine hours during the period. Inventories: Raw Materials, 1/1/13 $ 8,000 Raw Materials, 12/31/13 $ 7,000 Work in Process, 1/1/13 $ 6,000 Work in Process, 12/31/13 $ 7,500 The company uses normal costing to record product costs. The company budgeted for $52,500 in total overhead costs for the year. The cost driver associated with the overhead is machine hours and the company expected to use 10,500 machine hours. REQUIRED: 1) Compute the amount of over-applied or under-applied overhead cost for the year. 2) Determine the cost of goods manufactured for the year. How did absolutism happen? (will give brainliest!! please help me! thank you!)a) The rows on the periodic table are called periods. How many energy levels are in the atoms of each element in period 2 (lithium-neon)b) What is the group number of the halogens?c) What do the elements in each group have in common? please please help me, i will give brainliest Find the vertex and focus of the parabola. x^2 + 4x - 8y + 12 = 0 What is the equation of a line with slope -3 and goes through point (2,-4)?