首页 > 代码库 > 菜鸟生活(python)之if判断(数字游戏)

菜鸟生活(python)之if判断(数字游戏)

 

#/usr/bin/env python
#-*-conding:utf-8-*-
#猜age游戏
Shinyboy1 = 21
while True:
guess_age = int(input("Please input age :"))
if guess_age == Shinyboy1:
print("ok ,very good!")
elif guess_age > Shinyboy1:
print("think smaller...")
else:
print("think bigger...")

 

菜鸟生活(python)之if判断(数字游戏)