摘要: def main(): pass task3 from turtle import * def square(size=50, rgb = 'black'): pencolor(rgb) for i in range(4): fd(size) left(90) for i in range(11): 阅读全文
posted @ 2021-06-14 16:45 麦热姆 阅读(59) 评论(0) 推荐(0)
摘要: import student stu1=student.Student('202013170000','lucy','大物','69') stu2=student.Student('202013171000','tom','应气','86') stu1.info() stu2.get_balance 阅读全文
posted @ 2021-06-01 22:07 麦热姆 阅读(51) 评论(0) 推荐(0)
摘要: task7-3 import random #时间模块 import datetime time=datetime.datetime.now() time=time.strftime("%Y%m%d") with open("data7.txt","r",encoding="gbk")as f: d 阅读全文
posted @ 2021-05-17 23:16 麦热姆 阅读(57) 评论(0) 推荐(0)
摘要: x = list(range(10)) print('整数输出1: ', end = '') for i in x: print(i, end=' ') print('\n整数输出2: ', end = '') for i in x: print(f'{i:02d}', end = '-') pri 阅读全文
posted @ 2021-04-22 21:22 麦热姆 阅读(65) 评论(0) 推荐(0)
摘要: x1,y1=1.2,3.57 x2,y2=2.26,8.7 # 输出1 print('{:-^40}'.format('输出1')) # 这样可以输出-分割线,输出1字符居中 print('x1={},y1={}'.format(x1,y1)) print('x2={},y2={}'.format( 阅读全文
posted @ 2021-04-18 10:41 麦热姆 阅读(51) 评论(0) 推荐(0)