
import turtle
t = turtle.turtle()
def rect(x, y, w, h, color):
pass
def center_rect(x, y, w, h, color):
x_left = x - w / 2
y_left = y + h / 2
rect(x_left, y_left, w, h, color)
def main():
x_center = 1
y_center = y
width = 100
height = 20
color = 'red'
center_rect(x_center, y_center, width, height, color)
if __name__ == '__main__':
main()



by: 发表于:2017-09-19 09:41:42 顶(0) | 踩(0) 回复
??
回复评论