MYXHH

导航

 

2021年6月11日

摘要: task3 from turtle import * def square(size=50,rgb='pink'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) for 阅读全文
posted @ 2021-06-11 16:56 MYXHH 阅读(37) 评论(2) 推荐(0) 编辑
 

2021年5月25日

摘要: class StudentDoc: def __init__(self,num,name,major,score): self._num=num self._name=name self._major=major self._score=score def set(self,score): self 阅读全文
posted @ 2021-05-25 18:03 MYXHH 阅读(45) 评论(2) 推荐(0) 编辑
 

2021年4月23日

摘要: #实验任务1#tast1_1 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='-')#指定 阅读全文
posted @ 2021-04-23 12:42 MYXHH 阅读(29) 评论(2) 推荐(0) 编辑
 

2021年4月2日

摘要: 任务一 x1, y1 = 1.2, 3.57 x2, y2 = 2.26, 8.7 print('{:-^40}'.format('输出1')) print('x1 = {}, y1 = {}'.format(x1, y1)) print('x2 = {}, y2 = {}'.format(x2, 阅读全文
posted @ 2021-04-02 18:18 MYXHH 阅读(36) 评论(1) 推荐(0) 编辑
 
摘要: #输出单个字符 print('hey,u') #输出多个字符或数据 print('hey','u') x=1 y=2 z=3 print(x,y,z) #用户混合字符串和变量值 print('x=%d,y=%d,z=%d'%(x,y,z))#方法一 print('x={},y={},z={}'.fo 阅读全文
posted @ 2021-04-02 16:30 MYXHH 阅读(43) 评论(0) 推荐(0) 编辑