0% found this document useful (0 votes)
21 views1 page

Assignment 02 SOL

Uploaded by

Aseil Nagro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Assignment 02 SOL

Uploaded by

Aseil Nagro
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a program that will ask the user to enter the amount of a purchase.

The program should


then compute the sales tax. Assume the sales tax is 15 percent. The program should display the
amount of the purchase, the sales tax, and the total of the sale (which is the sum of the amount
of purchase plus the sales tax).

amount = float(input("Enter the amount of purchase: "))

tax =(amount / 100 * 15 )

salestax = amount * tax

Totalsalestax = amount + tax

print("The amount of the purchase:",amount)

print("The sales tax:", tax)

print("The total sales tax:",Totalsalestax)

2. Write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is
as follows:

celsius = float(input(" enter a temperature in Celsius: "))
f = (9/5) * celsius + 32 
print("the  temperature converted to Fahrenheit",f)

You might also like