Commit 5b711a7c by BellCodeEditor

auto save

parent f25effac
Showing with 30 additions and 0 deletions
for m in range(1,10):
for n in range(1,m+1):
print(m,'*',n,'=',(m*n),sep="",end=" ")
print()
\ No newline at end of file
i = 5 # 行
j = 3 # 列
print(j,"*",i,"=",(j*i))# 使用变量i和j,代替乘法算式里面的元素,打印出单个乘法算式
file=open(r'C:\Users\玛酷\Desktop\test.txt','w',encoding='utf-8')
file.write('国庆节快乐')
file.close()
file=open(r'C:\Users\玛酷\Desktop\test.txt','r',encoding='utf-8')
a=file.read()
print(a)
file.close()
new_data=""
file=open(r'C:\Users\玛酷\Desktop\test.txt','r',encoding='utf-8')
for i in file:
if '国庆' in i:
new=i.replace('国庆','中秋')
new_data=new_data+new
print(new_data)
\ No newline at end of file
for m in range(1,10):
for n in range(1,10):
print(m,'*',n,'=',(m*n),sep="",end=" ")
print()
\ 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