One Function per Task چالش 5 از جلسهی 1، متوسط
دو تابع hello و joke آمادهاند. منو را کامل کن تا:1 → تابع hello اجرا شود2 → تابع joke اجرا شود3 → Bye! چاپ شود
def hello():
print("Hello! Nice to see you.")
def joke():
print("Why was the computer cold? It left its Windows open!")
print("1) Hello")
print("2) Joke")
print("3) Quit")
choice = input()
راهنما و جواب این چالش · برگشت به درس جلسهی 1: اپ چیست؟ · چالش بعدی: Text or Number?
بیشتر بخوان: تابع در پایتون: آموزش def، پارامتر و return با مثال