Skip to main content

SoloLearn Python Core: celsius to fahrenheit converter code project answer

Code project answer of  SoloLearn mobile Application and project celsius to fahrenheit converter code from Python Core course.

celsius = int(input())
def conv(c):
    celsius = c
    f = 9/5 * celsius + 32
    return f

fahrenheit = conv(celsius)
In this code we just need to declare a variable, we can name it as 'f' and assign values of equation of Fahrenheit to Celsius convertor equation (9/5 * Celsius + 32), and return that variable f and print it.

What is happening here is. In the first line we take one 'int' or 'whole number' as input and then we call the function 'conv' which returns converted value f. Then we simply take or copy that return variables data to our new variable called 'fahrenheit', and then we are going to print it.