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