Question

In Python, write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as...

In Python, write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows:

F=(9/5)C+32

The program should ask the user to enter a temperature in Celsius, then display the temperature converted to Fahrenheit.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

// Screenshot of the code

- O X ETC.py - C:/Users/alsriniv/AppData/Local/Programs/Python/Python37-32/TC.py (3.7.4) File Edit Format Run Options Window

// Sample output

T Python 3.7.4 Shell - 0 x File Edit Shell Debug Options Window Help Python 3.7.4 (tags/v3.7.4:009359112e, Jul 8 2019, 19:29:

// Code to copy

TC.py

# take input from the user
celsius = float(input('Enter temperature in Celsius: '))

# calculate fahrenheit
fahrenheit = (celsius * 1.8) + 32
print('%0.1f temperature in Celsius is equal to %0.1f temperature in Fahrenheit' %(celsius,fahrenheit))

Add a comment
Know the answer?
Add Answer to:
In Python, write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT