Commit c4972d8e by BellCodeEditor

auto save

parent 3565e3af
Showing with 56 additions and 16 deletions
m1='Hello'
m2='Python'
m3=m1.join(m2)
print(m3)
\ No newline at end of file
# 利用write()帮助悟空给诺依回信吧~
import turtle
len=60
pen=turtle.Pen()
screen=turtle.Screen()
screen.bgcolor("pink")
pen.penup()#抬笔
pen.goto(0,-200)#走
pen.pensize(20)
pen.pendown()#落笔
pen.circle(200,360)#花园
#——————————————————————眼睛1
pen.penup()
pen.goto(100,-100)
pen.write("诺依\n你好呀",font=("Times",20,"normal"))
pen1=turtle.Pen()
pen1.pensize(5)
pen1.pencolor("red")
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(len,180)
pen1.forward(2*len)
pen.hideturtle()
pen.goto(-100,50)
pen.pendown()
pen.fillcolor("blue")
pen.begin_fill()#填充
pen.circle(20,360)
pen.end_fill()#填充
#——————————————————————眼睛2
pen.penup()
pen.goto(100,50)
pen.pendown()
pen.fillcolor("blue")
pen.begin_fill()#充
pen.circle(20,360)
pen.end_fill()#填充
#——————————————————————鼻子
pen.penup()
pen.goto(0,50)
pen.pendown()
pen.circle(-50,steps=3)
pen.penup()
#——————————————————————嘴巴
#嘴巴1
pen.goto(-150,-70)
pen.pendown()
pen.goto(0,-170)
pen.goto(150,-70)
turtle.done()
\ No newline at end of file
for i in range (1,10):
for j in range(1,i+1):
print(j,"*",i,"=",j*i,end=" ")
print("\n")
\ No newline at end of file
score=[]
sum=0
average=0
for i in range(5):
studentscore=input("请输入成绩:")
score.append(int(studentscore))
for i in score:
print("请输入成绩:",i)
sum+=int(i)
average=sum/5
print("班级成绩为: score=",score)
print("班级平均分为:",int(average))
\ No newline at end of file
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