top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

building an Fahrenheit to Celsius Converter

today we will be building a Fahrenheit to Celsius Converter in Python.

Generally to measure the temperature we make use of one of these two popular Fahrenheit & Celsius.

Converting one into another is usually boring and can be easily automated. Today we will be building a simple & short project which will convert Fahrenheit to Celsius for us in seconds.

So the first thing we are going to do is to ask the user for the temperature in Fahrenheit to convert it into the Celsius.


temp = float(input("Enter temperature in Fahrenheit: "))

We will convert the temperature into float using float() so that we can perform calculations on it.


celsius = (temp - 32) * 5/9

This expression you see above is the general formula to convert Fahrenheit into Celsius.


let's print our temperature in Celsius:



print(f"{temp} in Fahrenheit is equal to {celsius} in Celsius")

user input is 6:


Enter temperature in Fahrenheit: 6

output:


6.0 in Fahrenheit is equal to -14.444444444444445 in Celsius


 
 
 

Comments


COURSES, PROGRAMS & CERTIFICATIONS

 

Advanced Business Analytics Specialization

Applied Data Science with Python (University of Michigan)

Data Analyst Professional Certificate (IBM)

Data Science Professional Certificate (IBM)

Data Science Specialization (John Hopkins University)

Data Science with Python Certification Training 

Data Scientist Career Path

Data Scientist Nano Degree Program

Data Scientist Program

Deep Learning Specialization

Machine Learning Course (Andrew Ng @ Stanford)

Machine Learning, Data Science and Deep Learning

Machine Learning Specialization (University of Washington)

Master Python for Data Science

Mathematics for Machine Learning (Imperial College London)

Programming with Python

Python for Everybody Specialization (University of Michigan)

Python Machine Learning Certification Training

Reinforcement Learning Specialization (University of Alberta)

Join our mailing list

Data Insight participates in affiliate programs and may sometimes get a commission through purchases made through our links without any additional cost to our visitors.

bottom of page