Kód
def celsius_to_fahrenheit(celsius):
return celsius * (9/5) + 32
fok = float(input("Add meg a fokot: "))
# Tesztelés
print(celsius_to_fahrenheit(fok)) # Várható eredmény 25 esetén: 77.0
def celsius_to_fahrenheit(celsius):
return celsius * (9/5) + 32
fok = float(input("Add meg a fokot: "))
# Tesztelés
print(celsius_to_fahrenheit(fok)) # Várható eredmény 25 esetén: 77.0