Commit 73ec46eb by BellCodeEditor

save project

parent 7eb45fcc
Showing with 16 additions and 4 deletions
import turtle import turtle
screen=turtle.Screen() screen=turtle.Screen()
screen.bgcolor("white") screen.bgcolor("white")
a=turtle.textinput("请输入第一个乘数","输入框:") z=turtle.textinput("请问你要是用什么计算方式?","请用加,减,乘,除来回答")
b=turtle.textinput("请输入第二个乘数","输入框:") a=turtle.textinput("请输入第一个数","输入框:")
b=turtle.textinput("请输入第二个数","输入框:")
i =int(a) i =int(a)
j =int(b) j =int(b)
turtle.write(j*i,font=("Times",20,"normal")) if z=="乘":
turtle.hideturtle() turtle.write(j*i,font=("Times",20,"normal"))
turtle.hideturtle()
if z=="加":
turtle.write(j+i,font=("Times",20,"normal"))
turtle.hideturtle()
if z=="减":
turtle.write(j-i,font=("Times",20,"normal"))
turtle.hideturtle()
if z=="除":
turtle.write(j/i,font=("Times",20,"normal"))
turtle.hideturtle()
turtle.done() turtle.done()
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