'목록하단 광고 치환자(withSeok)
728x90

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import random
 
random_number=random.randint(1,100)
 
game_count=1
 
while True:
    my_number=int(input("1~100 사이의 숫자를 입력하세요. : "))
 
    if my_number>random_number:
        print("다운")
    elif my_number<random_number:
        print("업")
    elif my_number==random_number:
        print(f"맞습니다. {game_count}회 만에 맞췄습니다.")
        break
    game_count+=1
 
cs
728x90

+ Recent posts