Commit ab8cdc5c by BellCodeEditor

save project

parent 52999abc
Showing with 12 additions and 22 deletions
import os
import time
#os.makedirs(r"C:\Users\LENOVO\Desktop\我去\hello\花花")
#print("获取当前工作的目录为:"+os.getcwd())
with open(r"C:\Users\LENOVO\Desktop\newday.txt","w")as file:
file.write("这是新的一天")
#time.sleep(1)
os.rename(r"C:\Users\LENOVO\Desktop\newday.txt",r"C:\Users\LENOVO\Desktop\mylife.txt")
print("文件名修改成功")
#time.sleep(1)
size=os.path.getsize(r"C:\Users\LENOVO\Desktop\mylife.txt")
time.sleep(1)
print("文件大小为%s"%size)
os.remove(r"C:\Users\LENOVO\Desktop\mylife.txt")
print("byebye")
"""
请使用turtle模块画出五角星
"""
import turtle
pen=turtle.Pen()
pen.pencolor("pink")
for i in range(5):
pen.forward(200)
pen.right(144)
pen.hideturtle()
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