Commit 4d8f5ec0 by BellCodeEditor

save project

parent c7b105c8
Showing with 3 additions and 3 deletions
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
import turtle import turtle
sc = turtle.Screen() sc = turtle.Screen()
while True: while True:
a = sc.textinput("爱心大小","请输入(30~100):") a = sc.textinput("爱心大小","请输入(30~100,输‘退’退出):")
len = float(a) if a == "退":
if a % 1 != 0:
break break
else: else:
len = float(a)
if len < 30 or len > 100: if len < 30 or len > 100:
print("请重输") print("请重输")
else: else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment