Find us on Facebook

Thursday, December 13, 2018

Python Program to convert temperature in Celsius to Fahrenheit



Aim: Implement a program to convert temperature in Celsius to Fahrenheit
Algorithm
 1: start 
 2: read the temperature in centigrade 
 3: store the value in celsius 
 4: set farenheit to 32+ (1.8*celsius) 
5: print value of celsius, farenheit
6: stop
Program:
# Input is provided by the user in degree Celsius
# take input from the user
celsius = float(input('Enter degree Celsius: '))
# calculate fahrenheit
fahrenheit = (celsius * 1.8) + 32
print('%0.1f degree Celsius is equal to %0.1f degree Fahrenheit' %(celsius,fahrenheit))
Output:
Enter degree Celsius: 37.5
37.5 degree Celsius is equal to 99.5 degree Fahrenheit



0 Comments:

Popular Posts

Text Widget

Search This Blog

Powered by Blogger.

Blogger Pages

Like Canvas?

Sponsor

Footer Widgetized Areas

About Canvas

About Canvas

Subscribe Us

About

Text Widget

Tags

Total Pageviews

print pdf

cal

Most Popular

    TUPLES
 LIST and SLICING
      ASCII VALUE
Copyright © KTU Btech Cse Python Lab Manuals | Powered by Blogger
Design by Saeed Salam | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates