猜数字

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import turtle
>>> turtle.circle(50)
>>> turtle.circle(100)
>>> 

  猜数字_第1张图片

Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import turtle
>>> turtle.circle(50)
>>> turtle.circle(100)
>>> turtle.goto(0,-100)
>>> turtle.circle(200)
>>> turtle.up()

猜数字_第2张图片

myNum = 7 print('猜数字游戏\n') while True: guess = int(input('请猜一个数:')) if guess > myNum: print('猜大了') elif guess < myNum: print('猜小了') else: print('恭喜你,猜对了!') break

  猜数字_第3张图片

转载于:https://www.cnblogs.com/Paris-YY/p/8968683.html

你可能感兴趣的:(猜数字)