python循环画图例题_Python练习实例59 Python 练习实例59
题⽬:画图,综合例⼦。
程序分析:利⽤for循环控制100-999个数,每个数分解出个位,⼗位,百位。。
程序源代码:
#!/usr/bin/python
# -*- coding: UTF-8 -*-
if __name__ == '__main__':
from Tkinter import *
canvas = Canvas(width = 300,height = 300,bg = 'green')
canvas.pack(expand = YES,fill = BOTH)
x0 = 150
y0 = 100
企业年报公示ate_oval(x0 - 20,y0 - 20,x0 + 20,y0 + 20)
盗窃司法解释import math
常见疾病B = 0.809
for i in range(16):
a = 2 * math.pi / 16 * i
x = il(x0 + 48 * s(a))
y = il(y0 + 48 * math.sin(a) * B)
for k in range(501):
for i in range(17):
a = (2 * math.pi / 16) * i + (2 * math.pi / 180) * k
x = il(x0 + 48 * s(a))第一次国共合作正式形成的标志
y = il(y0 + 48 + math.sin(a) * B)
步步为赢药膏ate_line(x0,y0,x,y,fill = 'red')
for j in range(51):
a = (2 * math.pi / 16) * i + (2* math.pi / 180) * k - 1
电工实训x = il(x0 + 48 * s(a))
dnf网名
y = il(y0 + 48 * math.sin(a) * B)
初七吃什么
以上实例输出结果为: