## August 29, 2019 Basic Python: Nuts and Bolts

Over the past few posts, we have introduced Python through the use of descriptive statistics and the corresponding libraries such as NumPy/SciPy, Pandas, etc. We will take a hiatus from the data science aspects of Python and focus on the core language itself. Python is fast becoming the go-to language for many computer science programs in North America. This is because of the simplicity of the language and its ability to perform complex tasks in fewer lines of code. These tasks include the descriptive statistics programs highlighted in the series. In this post, we look at a standard Python program and explain each line of code. Here is a past program performing temperature conversions:

response = "Yes"
while response == "Yes" or response == "yes" or response == "YES" or response == "Y" or response == "y":
fahrenheit = float(input("Enter temperature in Fahrenheit: "))
celsius = 5.0/9.0 * (fahrenheit - 32.0)
N = format(celsius, '.2f')
print("The equivalent in Celsius is", n)
response = input("Do you want to continue?")



Johnny Hopkins

Guest Blogger

categories & Tags

UNLEASH THE GIG ECONOMY. START A PROJECT OR TALK TO SALES
Close