파이썬 카지노
user_choice = int(input("Choose number > "))
pc_choice = 50
if user_choice == pc_choice:
print("You Won!")
elif user_choice > pc_choice:
print("Lower!")
elif user_choice < pc_choice:
print("Higher!")
----------------------------------------------
Built-in Functions
: 항상 사용할 수 있는 함수들
random
1. import를 먼저 해주어야한다.
from random import randint, uniform
user_choice = int(input("Choose number > "))
pc_choice = randint(1, 50)
if user_choice == pc_choice:
print("You Won!")
elif user_choice > pc_choice:
print("Lower! Computer chose", pc_choice)
elif user_choice < pc_choice:
print("Higher! Computer chose", pc_choice)