Created
August 8, 2021 05:07
-
-
Save oiojin831/9a80d786e5a0645e51fbd149c05bfa85 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
def inch_to_cm(inch): | |
return inch * 2.54 | |
def cm_to_inch(cm): | |
return cm / 2.54 | |
def convert(num, unit): | |
if unit == "inch": | |
return inch_to_cm(num) | |
elif unit == "cm": | |
return cm_to_inch(num) | |
print(inch_to_cm(10)) | |
print(cm_to_inch(25.4)) | |
print(convert(10, "inch")) | |
print(convert(25.4, "cm")) | |
def hello(name): | |
return f"안녕 {name}!!!" | |
def info(name, height, weight): | |
return f"저는 {name}입니다. 키는 {height}cm이고 몸무게는 {weight}kg입니다." | |
print(hello("응진")) | |
print(info("응진", 178, 78)) | |
def gugudan(num): | |
print(f"{num} 단") | |
for x in range(1,10): | |
print(f"{x} * {num} = {x * num}") | |
gugudan(5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment