Commit 13aa06c7 by BellCodeEditor

save project

parent 13413902
for i in range(2000,3201):
\ No newline at end of file
new_data='' import turtle
with open(r'C:\Users\bellcode\Desktop\myfile2.txt','r',encoding='utf-8') as file: pen=turtle.Pen()
for data in file: pen.hideturtle()
if '小鬼:24' in data: pen.fillcolor('green')
i=i.replace('小鬼:24','小葵:25') pen.begin_fill()
new_data=new_data+data pen.forward(300)
pen.left(120)
with open(r'C:\Users\bellcode\Desktop\myfile2.txt','w',encoding='utf-8') as file: pen.forward(450)
file=file.write(new_data) pen.left(120)
pen.forward(450)
with open(r'C:\Users\bellcode\Desktop\myfile2.txt','r',encoding='utf-8') as file: pen.left(120)
a=file.read() pen.forward(150)
print(a) pen.left(120)
\ No newline at end of file pen.forward(300)
pen.right(120)
pen.forward(450)
pen.right(120)
pen.forward(450)
pen.right(120)
pen.forward(150)
pen.end_fill()
pen.fillcolor('red')
pen.begin_fill()
for i in range(6):
pen.forward(150)
pen.right(60)
pen.end_fill()
turtle.done()
\ No newline at end of file
for i in range(2000,3201):
if i%7 == 0 and i%5 != 0:
print(i)
\ No newline at end of file
num=input("请输入所要相加的数字:") import turtle
num2=int(input("请输入相加的次数:")) pen=turtle.Pen()
sum=0 pen.hideturtle()
str="" pen.speed(50)
for i in range(num2): pen.fillcolor('black')
str=str+num pen.left(30)
sum=int(str)+sum for i in range(60):
print(sum) pen.forward(150)
\ No newline at end of file pen.penup()
pen.left(180)
pen.pendown()
pen.forward(150)
pen.penup()
pen.right(178)
pen.pendown()
pen.left(180)
for i in range(60):
pen.pendown()
pen.forward(30)
pen.penup()
pen.left(180)
pen.pendown()
pen.forward(30)
pen.penup()
pen.left(178)
pen.pendown()
turtle.done()
\ No newline at end of file
str=input("请输入三条边:") with open(r'c:\Users\bellcode\Desktop\mydata.txt','r',encoding='utf-8') as file:
nums=eval(str) a=file.read()
c=list(nums) print(a)
c.sort() \ No newline at end of file
print(c)
if c[0]+c[1]>c[2]:
print("边长{}{}{}能组成三角形".format(c[0],c[1],c[2]))
if c[0]==c[1] or c[1]==c[2]:
print("是等腰三角形")
elif c[0]**2 + c[1]**2 == c[2]**2:
print("是直角三角形")
else:
print("是普通三角形")
else:
print("不能组成三角形")
for i in range(1,10):
for j in range(1,i+1):
print(str(j)+"×"+str(i)+"="+str(j*i)+"|",end="\t")
print()
\ No newline at end of file
import turtle as t
a=(200**2*2)**0.5
t.left(90)
t.circle(100,225)
t.fd(a)
t.up()
t.goto(0,0)
t.fd(200)
t.down()
t.left(90)
t.circle(100,225)
t.fd(a)
t.done()
with open(r'C:\Users\bellcode\Desktop\myfile.txt','r',encoding='utf-8') as file1: num=int(input('请输入一个正整数:'))
for i in file1: for i in range(1,num+1):
if '小鬼:24' in i: print(i,end='')
print('数据在txt文件中')
\ 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