Commit b9cd2053 by BellCodeEditor

auto save

parent db4ec920
Showing with 40 additions and 0 deletions
import turtle
a=turtle.Pen()
a.penup()
a.speed(5)
a.color("green")
a.setpos(0,200)
a.pendown()
a.fillcolor("black")
a.begin_fill()
a.right(60)
a.forward(100)
a.right(120)
a.forward(100)
a.right(120)
a.forward(100)
#turtle是库,Pen是类,done是函数,done让我们的画布不断出现
\ No newline at end of file
print("hello world")
\ No newline at end of file
import random#调用random模块
a=random.choice(['red','yellow','blue'])
print(a)
while True:
b=random.choice(['red','yellow','blue'])
if b!=a:
break
print(b)
c=random.choice(['red','yellow','blue'])
while True:
c=random.choice(['red','yellow','blue'])
if c!=a and c!=b:
break
print(c)
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