猜数字
Posted Paris-
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了猜数字相关的知识,希望对你有一定的参考价值。
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) >>>
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()
myNum = 7 print(\'猜数字游戏\\n\') while True: guess = int(input(\'请猜一个数:\')) if guess > myNum: print(\'猜大了\') elif guess < myNum: print(\'猜小了\') else: print(\'恭喜你,猜对了!\') break
以上是关于猜数字的主要内容,如果未能解决你的问题,请参考以下文章