Answer to Question #161066 in Computer Networks for Austin

Question #161066

Task 1 (2 pt): A program that converts a temperature in F that the user provides and returns the equivalent temperature in C.  Hint: Google is your friend! Given F, solve for C.  This program does not require an if structure and has a straight forward input – process – output structure!

1
Expert's answer
2021-02-03T16:36:14-0500
# Python program that gets temperature in Fahrenheit and  converts to degrees Celsius
degreesInF = input("Enter temperature in Fahrenheit: ")
# Cast user input to int and convert to degrees Celsius
degreesInC = (int(degreesInF) - 32) * 5 / 9
# Display result in 2 decimal places
print("{:.2f}".format(degreesInC))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS