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.
Yes, the written program has the correct logic to assign the correct discount for each of the 4 valid values of customer_category
<h3>What is a Program?</h3>
This refers to the sequence of instructions that are keyed into a computer to execute user-specific commands.
Hence, we can see that based on the variable customer_category that has a string that is one of these 4 values:
0 for "None"
5 for "Bronze"
10 for "Silver"
20 for "Gold"
The program uses the correct syntax as it gives the correct discount based on the assigned values of the variable customer_category as executed with the syntax above.
Read more about programs here:
brainly.com/question/1538272
#SPJ1
Answer: E. class, objects
Explanation:
<em>A </em><em><u>class</u></em><em> is the blueprint for </em><em><u>objects</u></em><em> having similar attributes.</em>
As much as classifying something means to define it based on the characteristics that is has that are similar to other things in that class, so also is a class here.
A class is the blueprint or rather template for making objects that have similar attributes which means that the class therefore gives the object its various attributes and its behavior.