1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 5-11 ¹«ÇÑ ¹Ýº¹¹®À¸·Î ¼ýÀÚ ¸ÂÃ߱⠰ÔÀÓÀ» ¸¸µéÀÚ, 134ÂÊ # import random tries = 0 guess = 0 answer = random.randint(1, 100) print("1ºÎÅÍ 100 »çÀÌÀÇ ¼ýÀÚ¸¦ ¸ÂÃ߽ÿÀ") while guess != answer: guess = int(input("¼ýÀÚ¸¦ ÀÔ·ÂÇϽÿÀ: ")) tries = tries + 1 if guess < answer: print("³·À½!") elif guess > answer: print("³ôÀ½!") print("ÃàÇÏÇÕ´Ï´Ù. ÃÑ ½ÃµµÈ½¼ö=", tries) | cs |