-
-
Save parzibyte/bf657f9764a1286a9c7542221213f0c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
https://parzibyte.me/blog | |
""" | |
def fahrenheit_a_celsius(f): | |
return (f - 32) / 1.8 | |
def celsius_a_fahrenheit(c): | |
return (c * 1.8) + 32 | |
# Modo de uso | |
f = float(input("Ingresa los grados Fahrenheit: ")) | |
c = fahrenheit_a_celsius(f) | |
print(f"Los {f} grados Fahrenheit son {c} grados celsius") | |
c = float(input("Ingresa los grados Celsius: ")) | |
f = celsius_a_fahrenheit(c) | |
print(f"Los {c} grados Celsius son {f} grados Fahrenheit") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment