Vorlesung 2
This commit is contained in:
10
Vorlesung 2/Uebung4.py
Normal file
10
Vorlesung 2/Uebung4.py
Normal file
@@ -0,0 +1,10 @@
|
||||
celsius = input("Bitte geben Sie eine Temperatur in Celsius an: ") # z.b.: 32
|
||||
|
||||
celsius = int(celsius)
|
||||
|
||||
fahrenheit = celsius * (9/5) + 32
|
||||
kelvin = celsius + 273.15
|
||||
|
||||
# Bspw. 32° Celsius:
|
||||
print("Fahrenheit: ", round(fahrenheit,2)) # = 89.6
|
||||
print("Kelvin: ", round(kelvin,2)) # = 305.15
|
||||
Reference in New Issue
Block a user