Write a python statement for the following. a) Assigns the product of 10 and 15 to the variable product. b) Subtracts the variable down_payment from the variable total and assigns the result to the variable due. c) Multiplies the variable subtotal by 0.15 and assigns the result to the variable total. d) Prompts the user to enter his or her favorite color and assigns the user’s input to a variable named color. e) Assume the variable sales references a float value 56.3355. Round the value to two decimal points.
Answers:
a) product = 10*15
b) due = total - down_payment
c) total = subtotal*0.15
d) color = str(input("Enter your favourite color? "))
e) round(sales,2)
Comments
Leave a comment