-
实验8
Task3.py from turtle import * def square(size=50, rgb=(1,0.7,0)): '''绘制正方形 参数size指定边长 参数rgb指定画笔颜色 如果没有给参数,采用默认值 ''' pencolor(rgb) for i in range(4): f -
实验八
from turtle import * def square(size=50,rgb='yellow'): pencolor(rgb) for i in range(4): fd(size) left(90) setup(800,600) speed(0) n=10 for i in range( -
实验8
from turtle import * def square(size=50,rgb='pink'): pencolor('orange') for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) n=5 f -
实验八
Task3: 1 from turtle import * 2 3 def square(size=50, rgb='pink'): 4 '''绘制正方形 5 参数size指定边长 6 参数rgb指定画笔颜色 7 如果没有给参数,采用默认值 8 ''' 9 pencolor(rgb) 10 for -
实验8
from turtle import * def square(size=50, rgb='orange'): pencolor(rgb) for i in range(4): fd(size) left(90) def main(): setup(800,600) speed(0) n=10 fo -
实验8 Python库应用编程与体验
实验任务3 from turtle import * def square(size=50, rgb=(0.86,0.6,0)): '''绘制正方形 参数size指定边长 参数rgb指定画笔颜色 如果没有给参数,采用默认值 ''' pencolor(rgb) for i in range(4): f -
实验7
class User: """用户""" count = 0 def __init__(self, name='guest', password=111111, status=1): User.count += 1 self.name = name self.password = password -
实验七
class User: count = 0 def __init__(self, name='guest', password=111111, status=1): User.count += 1 self.name = name self.password = password self.stat -
实验7
1 class User: 2 count=0 3 4 def __init__(self,name='guest',password='111111',status=1): 5 User.count+=1 6 self.name=name 7 self.password=password 8 se -
实验7
class User: count=0 def __init__(self,name='guest',password='111111',status=1): User.count+=1 self.name=name self.password=password self.status=statue