Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python3.2
- # -*- coding: utf-8 -*-
- # main.py
- """ Task: Exercise 2.5
- Write a program which prompts the user for a Celsius temperature, convert
- the temperature to Fahrenheit and print out the converted temperature.
- """
- # Main
- celsius = float(input("Celsius: "))
- fahrenheit = round(((( celsius * 9 ) / 5 ) + 32), 1)
- print(str(celsius) + " °C are equal to " + str(fahrenheit) + " °F.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement