Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- get_degrees = input("Podaj temperaturę: ")
- get_unit = input("Podaj jednostkę [C/K]: ")
- if get_unit == 'C':
- converted_degrees = int(get_degrees) + 273.15
- print(f"{get_degrees} stopni C jest równoznaczne z {converted_degrees} K")
- elif get_unit == 'K':
- converted_degrees = int(get_degrees) - 273.15
- print(f"{get_degrees} stopni K jest równoznaczne z {round(converted_degrees, 2)} C")
- else:
- print("Proszę wpisz C lub K")
Advertisement
Add Comment
Please, Sign In to add comment