![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
上课内容
nsc07
这个作者很懒,什么都没留下…
展开
-
99乘法表另一个文件写入
f = open('c.txt','w') s = '' for i in range(1,10): for j in range(1,i+1): s +=('{}*{}={} '.format(j,i,i*j)) s += '\n' f.write(s)原创 2019-12-12 15:00:46 · 282 阅读 · 0 评论 -
金字塔
#另一个文件内金字塔 fo = open('c.txt','a') for i in range(1,20,2): str = ('*'*i).center(19) fo.write(str) fo.write('\n') fo.close #菱形 # for i in range(1,8,2): # i *= '*' # print(i.center(...原创 2019-12-12 14:58:34 · 78 阅读 · 0 评论 -
一箭串心
import turtle import time def curveMove(): for i in range(200): turtle.speed(10) turtle.right(1) turtle.forward(1) def curveMove2(): # 第二个半圆 for i in range(180): # 第...原创 2019-12-12 11:16:56 · 297 阅读 · 0 评论 -
购物车
user_list=[] user_login={} shopping_car=[] def read_all_user(): if user_list: return with open('account_info.txt','rt',encoding='utf-8')as f: text=f.read() if not te...原创 2019-12-12 10:53:14 · 77 阅读 · 0 评论 -
老师,学生,管理员
student1_login={} student1_class=[] student_list=[] def read_all_user(): if student_list: return with open('account_info.txt','rt',encoding='utf-8')as f: text=f.read() ...原创 2019-12-12 10:52:27 · 629 阅读 · 0 评论 -
上课内容2019.12.12
import requests import os import re base_url='https://www.pearvideo.com/' res=requests.get(base_url,headers={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko...原创 2019-12-12 10:43:06 · 179 阅读 · 0 评论