#TemperatureConversions.py
def main():
units = input("Which temperature you are using? (F for Fahrenheit, C for Celsius): ")
temp = eval(input("Please enter the temperature: "))
if (units == 'F'):
celcius = 5*(temp - 32)/9
print("The temperature is", celcius, "Celcius.")
else:
fahrenheit = 9*temp / 5+32
print("The temperature is", fahrenheit, "Fahrenheig")
main()
Code Example |
---|
Cpp :: sum of row s2 d array c++ |
Cpp :: c ifdef |
Cpp :: if statement c++ |
Cpp :: what is g++ and gcc |
Cpp :: doubly linked list in cpp |
Cpp :: print two dimensional array c++ |
Cpp :: c++ erase remove |
Cpp :: struct c++ |
Cpp :: sum of a matrix c++ |
Cpp :: check if element in dict c++ |
Cpp :: list in c++ |
Cpp :: vector c++ |
Cpp :: c ++ splitlines |
Cpp :: std::count() in C++ STL |
Cpp :: for loop in cpp |
Cpp :: how to use a non const function from a const function |
Cpp :: c++ print text |
Cpp :: accumulate vector c++ |
Cpp :: c++ recursion |
Cpp :: how to sort array in c++ stockoverflow |
Cpp :: c++ program to convert celsius to kelvin |
Cpp :: sum of first 100 natural numbers |
Cpp :: Pseudocode of Dijkstra’s Algorithm in C++ |
Cpp :: adding variables c++ |
Cpp :: store array in vector |
Cpp :: lists occurrences of characters in the string c++ |
Cpp :: Program to print full pyramid using |
Cpp :: get function in cpp. |
Cpp :: hello world programming |
Cpp :: c++ pass function as argument |