#there are 16 ounces in a pound and 2000 pounds in a ton
#solution accepts an integer value representing any number of ounces
#solution outputs the converted tons, pounds, and ounces represented by the input value of ounces
print(f"Enter the number of ounces to convert:")
ounces = int(input())
#convert ounces to pounds and tons
ounces_per_pound = 16
pounds_per_ton = 2000
total_per_pound = ounces // ounces_per_pound
remaining_ounces = ounces % ounces_per_pound
total_per_ton = total_per_pound // pounds_per_ton
remaining_pounds = total_per_pound % pounds_per_ton
#output number of tons, remaining pounds, and remaining ounces
print(f"Tons: {total_per_ton}")
print(f"Pounds: {remaining_pounds}")
print(f"Ounces: {remaining_ounces}")
To embed this project on your website, copy the following code and paste it into your website's HTML: