Simple conversion program

This was today’s task. If you didn’t manage to get it done today, please make sure that you have this code on your Google site and that you have provided accompanying pseudocode, complete with a brief outline of what is happening and preferably a screenshot of the console after the program has run.

print("1. Fahrenheit to Celsius")
print("2. Celsius to Fahrenheit")
x = input("Enter your choice: ")
value = input("Enter the value to be converted: ")
value = float(value)
if x == "1":
    output = (value - 32) * 5/9
    output = value * 9/5 + 32

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s