Python: Convert Celsius to Fahrenheit

less than 1 minute read

The code has been modified slightly and now uploaded to the site.

The questions are from the C++ Textbook.

Question

<— Return Home

21.py

'''

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

'''
celsius = float(input("Enter a degree in Celsius: "));
fahrenheit = (9 / 5) * celsius + 32;
print(str(celsius) + " Celsius is 109.4 Fahrenheit");

<— Return Home