From d7d939a60f0983181c7750d100fd69b0ffc14b63 Mon Sep 17 00:00:00 2001 From: ARYAN SHARMA <88881328+ARYAN706@users.noreply.github.com> Date: Wed, 20 Oct 2021 23:04:31 +0530 Subject: [PATCH] program 43 python program to convert temperature from celcius to farenheit --- program.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 program.py diff --git a/program.py b/program.py new file mode 100644 index 0000000..d737b28 --- /dev/null +++ b/program.py @@ -0,0 +1,17 @@ +celsius_1 = float(input("Temperature value in degree Celsius: " )) + +# For Converting the temperature to degree Fahrenheit by using the above +# given formula +Fahrenheit_1 = (celsius_1 * 1.8) + 32 + +# print the result +print('The %.2f degree Celsius is equal to: %.2f Fahrenheit' + %(celsius_1, Fahrenheit_1)) + +print("----OR----") +celsius_2 = float (input("Temperature value in degree Celsius: " )) +Fahrenheit_2 = (celsius_2 * 9/5) + 32 + +# print the result +print ('The %.2f degree Celsius is equal to: %.2f Fahrenheit' + %(celsius_2, Fahrenheit_2))