Answer:
The program to this question as follows:
Program:
price=float(input('Enter total price: ')) #define variable price and take user-input
print('Enter value of weight separately into pounds and onces: ') #print message
pounds=int(input('Input pounds value: ')) # defining variable pounds and take user-input
ounces=int(input('Input ounces value: ')) # defining variable ounces and take user-input
total_ounces=pounds*16+ounces # defining variable total_ounces and calculate variable
total=price/total_ounces # defining variable total and calculate price/ounces
print('price/ounces is: ',total) #print value
Output:
Enter total price: 25.50
Enter value of weight separately into pounds and onces:
Input pounds value: 1
Input ounces value: 9
price/ounces is: 1.02
Explanation:
In the above python program code, a variable "price" is defined, that is takes price value from user, to take this value the "input and float" is used, in which the "float" convert value into decimal and input function is used for user- input.