![jonathanLV6231](/avatars/21798.jpg)
jonathanLV6231
12.06.2021 •
Computers and Technology
PYTHON PROGRAMMING
The manager of the Super Supermarket would like to be able to compare the unit price for products sold there. To do this, the program should input the name and price of an item per pound and its weights in pounds and ounces. Then it should determine and display the unit price (the price per ounce) of that item and the total cost of the amount purchased. You will need the following variables:
ItemName PoundPrice Pounds
TotalPrice Ounces UnitPrice
You will need the following formulas:
UnitPrice = PoundPrice/16
TotalPrice = PoundPrice * (Pounds + Ounces/16)
Solved
Show answers
More tips
- F Family and Home How to Build a Strong Relationship with Your Child: Tips for Effective Communication...
- H Health and Medicine Boosting Immunity: A Complete Guide on How to Improve Your Body’s Natural Defenses...
- C Computers and Internet The Best Antivirus Programs for your PC...
- S Style and Beauty How to Get Rid of Acne: Scientifically Proven Methods...
- H Health and Medicine Simple Ways to Lower Cholesterol in the Blood: Tips and Tricks...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
- S Style and Beauty Intimate Haircut: The Reasons, Popularity, and Risks...
- A Art and Culture When Will Eurovision 2011 Take Place?...
- S Style and Beauty How to Choose the Perfect Hair Straightener?...
Answers on questions: Computers and Technology
- C Computers and Technology Should i turn off my computer when a program becomes unresponsive?...
- C Computers and Technology This assignment is to assess various CPU-scheduling algorithms. 1. Consider the following set of processes, with the length of the CPU burst given in milliseconds:...
- C Computers and Technology G You have a class called Product (with both an empty constructor and a second constructor that takes a quantity and a price as parameters.) It has a quantity and...
- C Computers and Technology What is the purpose of the time-to-live (TTL) field of the IPv4 packet? a. ensures that the packet remains in the network long enough to reach its destination b....
- C Computers and Technology The timer interrupt is a key mechanism used by the OS. Usually, it waits some amount of time (say 10 milliseconds) and then interrupts the CPU. If we introduce a...
- C Chemistry Which of the following statements is consistent with the electron configuration 1s22s22p63s23p4? a. There are 4 electrons present in a 3p orbital. b. There are 4...
- M Mathematics Construct and interpret a 99% confidence interval for the mean arsenic levels of the dolphins if the sample of 28 dolphins has a mean arsenic level of 5.26 parts...
- M Mathematics In order to determine the average commute of college students, a researcher gathers data from a group of 50 students at the local college. This sample yieldied a...
- M Mathematics Emily779593 this is for ya :)...
- C Chemistry Science class help Marisol and Jose are running a race. Jose s kinetic energy is 600 joules. if he slows down from 5m/s to 2.5 m/s to catch his breath, what is his...
Ответ:
ItemName=input("Enter the name of the item purchased: ")
PoundPrice=input("Enter the price of an item per pound: ")
Pound=input("Enter the weight in pound: ")
Ounce=input("Enter the weight in ounce: ")
UnitPrice=int(PoundPrice)/16
TotalPrice=int(PoundPrice)*(int(Pound)+int(Ounce)/16)
print("The unit price is: "+UnitPrice)
print("The total price is: "+TotalPrice)
If this is what you needed:/
Ответ:
2
4
6
8
10
9
Explanation:
The loop runs from 1 to 10 in steps of 2, that is excluding the 10, so the values y gets are 1,3,5,7,9. The values that are printed are one higher, i.e., 2,4,6,8,10. Then finally the unchanged value of x is printed, which is 9.
QBasic implementation attached.