📜  小型 Python 游戏 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:31.455000             🧑  作者: Mango

代码示例1
# Random Number Generator
## Small Python Game
## You will win if you guess a number greater than the system generated number

import random

uNum = int(input("Enter a number between 0 and 100: "))
sNum = random.randint(0,100)

if uNum > sNum:
  print("You Win!!!")
else:
  print("Try Again!!!")

print("Your Number:", uNum, "\nSystem Number:", sNum)