حالت آفلاین — محتوا از حافظهٔ کش نمایش داده می‌شود
همهٔ تمرین‌ها

تبریک سال نو به سبک برنامه نویسان

تمرین آسان 2254 visibility link download flag

برنامه ای بنویسید که سال نو را به روشی خلاقانه به برنامه نویسان تبریک بگوید


این یک تمرین #فان هست بنابراین جواب درست یا غلط وجود نداره و حتی نیاز نیست کدی که مینویسید کار کنه. فقط کمی خلاقیت بخرج بدید :)
👨‍💻 19 ساعت قبل کاربر ناشناس این تمرین رو مشاهده کرد

پاسخ‌ها 17

import cowsay
a=input("Please,enter year(AD year):\n")
b=input("Please,enter your name:\n")
i1=1912
while i1<=3000 :
    if int(a)==i1 :
        m1=cowsay.get_output_string("tux",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m1)
        break
    else:
        i1+=12
        continue
i2=1913
while i2<=3000 :
    if int(a)==i2 :
        m2=cowsay.get_output_string("cow",f"Happy New Year,dear {b},I hope you have a year full of health and happiness :)")
        print(m2)
        break
    else:
        i2+=12
        continue
i4=1914
while i4<=3000 :
    if int(a)==i4 :
        m4=cowsay.get_output_string("meow",f"Happy New Year, dear {b}, I hope you have a year full of health and happiness :)")
        print(m4)
        break
    else:
        i4+=12
        continue
i5=1915
while i5<=3000 :
    if int(a)==i5 :
        m5=cowsay.get_output_string("turtle",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m5)
        break
    else:
        i5+=12
        continue
i6=1916
while i6<=3000 :
    if int(a)==i6 :
        m6=cowsay.get_output_string("dragon",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m6)
        break
    else:
        i6+=12
        continue
i7=1917
while i7<=3000 :
    if int(a)==i7 :
        m7=cowsay.get_output_string("octapus",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m7)
        break
    else:
        i7+=12
        continue
i8=1918
while i8<=3000 :
    if int(a)==i8 :
        m8=cowsay.get_output_string("kitty",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m8)
        break
    else:
        i8+=12
        continue
i9=1919
while i9<=3000 :
    if int(a)==i9 :
        m9=cowsay.get_output_string("cheese",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m9)
        break
    else:
        i9+=12
        continue
i10=1920
while i10<=3000 :
    if int(a)==i10 :
        m10=cowsay.get_output_string("daemon",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m10)
        break
    else:
        i10+=12
        continue
i21=1921
while i21<=3000 :
    if int(a)==i21 :
        m21=cowsay.get_output_string("turkey",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m21)
        break
    else:
        i21+=12
        continue
i22=1922
while i22<=3000 :
    if int(a)==i22 :
        m22=cowsay.get_output_string("fox",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m22)
        break
    else:
        i22+=12
        continue
i23=1923
while i23<=3000 :
    if int(a)==i23 :
        m23=cowsay.get_output_string("pig",f"Happy New Year, dear {b} , I hope you have a year full of health and happiness :)")
        print(m23)
        break
    else:
        i23+=12
        continue

def year():
    print("happy new year")
    print("----------------")
    print("happy day")
    print("------------------")
    print("Happy Programmer's Day")
    print("--------------------")
    print("I hope you have a good and happy year")
year()                    
def salno():
    print(f"Salam chetori {name}")
    print("omidvaram ke sal khobi ro dashte bashi!!!")
    print("hala bia ye soal sade riazi baham hal konim")
    a = int(input("2 + 2 mishe chand? "))
    if a == 4: print("kamelan eshtebah!!!!!","riazi balad nisti haaa")
    else: print("Afarin danesh mand")
    
name = input("esm:")
print(salno())
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠤⠤⠤⢤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⠞⠋⠀⠀⠀⠀⠀⠈⠛⢦⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⡾⢉⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡾⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢳⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣀⡀⠀⠀⠀⢀⡞⠀⡾⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡼⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⠴⠒⠉⠉⠉⠙⠲⢤⡀⠀⠀
⠀⠀⠀⢀⡾⠋⣹⡇⠀⠀⡼⠀⣸⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠉⢦⠀
⠀⠀⠀⣼⠁⢠⠏⠀⠀⢰⠃⢠⡇⠀⠀⠀⠀⠀⠀⣰⢶⡄⠀⠀⠀⣶⢳⡀⠀⠀⠀⠀⠀⠀⣀⡀⠘⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢇
⠀⠀⢰⠇⠀⡞⠀⠀⠀⡟⠀⣼⠀⣀⡴⠦⣤⣤⣠⠇⣸⠟⠳⣆⢸⠃⡼⡏⠻⣆⣰⠛⢲⣼⠉⢹⡆⢳⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸
⠀⠀⡞⠀⣸⠁⣀⣠⡼⠃⢠⡇⣰⠋⢠⡷⠀⣸⡿⠀⢠⣾⠀⢹⡟⠀⣰⢿⠀⣿⠇⢠⣿⠃⢠⡟⠀⠈⢧⠀⠀⠀⠀⠀⠀⠀⠀⢸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸
⠀⢰⠇⠀⠛⢉⣉⣠⡶⠀⣼⣴⠃⣠⣿⠁⢰⡿⠃⢠⢏⡞⢀⣾⠁⣰⢣⡏⢀⣿⠀⡼⠃⠀⡞⠀⠀⠀⠈⢳⡀⠀⠀⠀⠀⠀⠀⣸⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡏
⠀⡞⠀⣰⠛⠉⠀⢸⠁⠀⡇⡇⢀⡿⢁⡤⠾⣁⢀⠻⣞⣡⡾⡟⢠⡛⣏⣠⠟⠸⣆⣠⡆⢸⠃⠀⠀⠀⠀⠀⠙⢦⣄⣀⣠⠴⠚⠁⣇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⠞⠀
⢰⠃⢠⡇⠀⠀⠀⠘⠶⠞⠁⢧⣈⡴⠋⠓⢺⡏⢸⠛⠚⠉⢸⠇⣸⠉⠉⣥⣄⠀⠀⢸⠀⣸⠀⠀⠀⠀⠀⠀⠀⢠⡟⠉⠀⠀⠀⠀⠸⣆⠀⠀⠀⠀⠀⠀⠀⠀⣀⡴⠋⠀⠀
⣾⠀⣸⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⠁⡞⠀⠀⠀⡾⢀⡇⠀⠀⢿⡘⠓⠶⢏⣠⠟⠀⠀⠀⠀⠀⠀⢠⡟⠀⠀⠀⠀⠀⠀⠀⠹⣧⡀⠀⠀⣀⣠⠴⠚⠁⠀⠀⠀⠀
⠈⠉⠁⠀⠀⠀⠀⢀⣠⠤⠤⠤⢤⣀⠀⠀⡏⢰⡇⠀⠀⠀⡇⢸⣇⢀⡀⠀⠙⢳⠾⣏⠁⠀⠀⠀⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠟⠛⠛⣉⡀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢰⠋⠀⣀⣀⡤⢤⡙⢧⡀⠙⠚⠃⠀⠀⠀⠉⠉⣽⠏⣹⣆⣰⡏⢠⠏⠀⠀⠀⠀⠀⣰⠖⢾⡇⠀⠀⠀⠀⠀⠀⠀⢠⡿⠁⠀⢀⡼⠉⢙⡇⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢀⡟⠀⣸⠉⠀⢀⡼⠁⣠⠇⠀⠀⠀⠀⢠⡖⠋⢉⡉⢠⣄⣤⡄⢨⡿⠀⠀⠀⠀⠀⢰⠏⢀⡞⠀⠀⠀⠀⠀⠀⠀⢰⡟⠀⠀⠀⡼⠁⠀⡾⠁⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⣸⠁⢠⠇⣠⡴⠋⣀⡴⢫⡞⢛⣧⡴⠲⣤⣭⣉⡿⠁⡾⠀⡼⢀⡞⣀⣀⠀⠀⠀⢀⡟⠀⡾⠀⣀⡀⠀⠀⠀⠀⣰⡟⠀⠀⠀⢰⠃⠀⣸⠁⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢠⠇⠀⠞⠋⠁⠐⠛⢧⡀⣼⠛⣿⢻⠄⡀⠉⢠⣿⠃⢰⠃⣸⠣⣼⡟⠁⣸⣤⠞⠉⣻⠁⣸⣡⠞⠉⡙⠗⢶⣀⡴⢿⣤⡴⢦⡄⡏⠀⢠⠏⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⡾⠀⣠⠶⠒⠒⠒⣶⠀⣿⠇⢰⣇⡟⢠⠇⢠⡏⡟⠀⡞⣰⠃⣸⢏⠀⢠⣿⠋⢀⣾⠏⢠⣿⠃⢠⣾⠏⠀⣼⡟⠀⣸⡿⠀⣠⢿⠇⢠⡟⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢰⠇⢠⡏⠀⠀⣠⠞⠁⣰⣿⠀⣾⡾⣡⣿⠀⣼⡟⡁⢠⣷⠃⠀⢃⣿⠀⡾⠃⢀⣿⡏⠀⣸⡇⢠⣿⠋⠀⢸⡿⠁⢰⡿⠁⢰⠃⣼⠀⡾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣾⠀⣸⣀⡤⠚⢁⣠⠞⠁⢹⡀⣻⡴⠃⠸⣤⣨⠶⠳⠤⠴⣆⣠⠟⠹⠦⠴⣆⠘⢋⡴⣄⣉⣅⠘⣁⣴⡄⢛⣠⣄⠈⡀⠀⣯⣠⠿⣶⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣧⡀⢉⣀⡤⠖⠋⠁⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡾⠛⠉⠀⠀⠀⣈⣽⠿⠛⢻⣍⠁⠉⢹⡇⢸⠻⣇⣀⣼⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡴⠟⠁⠀⠀⣀⣠⡶⠞⠋⠀⠀⠀⢸⡘⠧⢤⣼⠁⣸⠀⠈⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠟⢋⣀⣤⡴⠖⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠙⠲⠤⠶⠚⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⢟⡛⠋⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
def new_year_wishes(name):
    print(f"سال نو مبارک، {name}!")
    print("آرزو می‌کنم که سال جدید پر از موفقیت، شادی و سلامتی باشد.")
    print("امیدوارم سال جدید بهترین سال زندگی شما باشد.")
    print(f"با آرزوی موفقیت‌های بزرگ برای شما، {name}!")

user_name = input("لطفاً نام خود را وارد کنید: ")
new_year_wishes(user_name)

ارسال جواب

جوابت را با Markdown بنویس و ثبت کن

×
بستن