1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | # # µû¶óÇÏ¸ç ¹è¿ì´Â ÆÄÀ̽ã°ú µ¥ÀÌÅÍ°úÇÐ(»ý´ÉÃâÆÇ»ç 2020) # LAB 5-12 ¾Ï»ê ¹®Á¦¸¦ ¸¸µé¾îº¸ÀÚ, 135ÂÊ # import random while True: plus = random.randint(0, 1) x = random.randint(1, 100) y = random.randint(1, 100) if plus == 0: print(x, '+', y, '=', end=' ') answer = int(input()) if answer == x + y: print('ÀßÇß¾î¿ä!!') else: print('Á¤´äÀº',x+y,'ÀÔ´Ï´Ù. ´ÙÀ½ ¹ø¿¡´Â ÀßÇÒ ¼ö ÀÖÁÒ?') else: print(x, '-', y, '=', end=' ') answer = int(input()) if answer == x - y: print('ÀßÇß¾î¿ä!!') else: print('Á¤´äÀº',x-y,'ÀÔ´Ï´Ù. ´ÙÀ½ ¹ø¿¡´Â ÀßÇÒ ¼ö ÀÖÁÒ?') # Á» ´õ ±ò²ûÇÑ ÄÚµå # while True: # plus = random.randint(0, 1) # x = random.randint(1, 100) # y = random.randint(1, 100) # if plus == 0: # print(x, '+', y, '=', end=' ') # result = x + y # else: # print(x, '-', y, '=', end=' ') # result = x - y # answer = int(input()) # if answer == result: # print('ÀßÇß¾î¿ä!!') # else: # print('Á¤´äÀº',result,'ÀÔ´Ï´Ù. ´ÙÀ½ ¹ø¿¡´Â ÀßÇÒ ¼ö ÀÖÁÒ?') | cs |