Computers and Technology, 04.11.2020 23:30 lkipjjjjjjjjjj5673
Using graphics. py to draw an American flag. Your flag should be draw according to the standard proportions for the Unites States Flag found on www. usflag. org/flag. specs. html.
this is what i have so far
import time
from graphics import *
from math import *
def main():
conv=400
stripetop=0
A=1.0
B=1.9
C=0.5385
D=0.76
E=0.054
F=0.054
G=0.063
H=0.063
K=0.0616
L=0.0769
win=GraphWin('Flag',1.9*conv,1*conv )
#stripes
for cntr in range(0,13):
s=Rectangle(Point(0,stripetop), Point(B*conv, stripetop+(L*conv)))
s. setOutline("black")
s. setWidth(1)
s. draw(win)
stripetop=stripetop+L*conv
if cntr%2==0:
s. setFill("red")
else:
s. setFill("white")
#union
u=Rectangle(Point(0,0),Point(D*conv , C*conv))
u. setFill("blue")
u. setOutline("black")
u. setWidth(1)
u. draw(win)
#defining the angles used for the star, then converting to radians
a1=(360/5)
a2=(a1/2)
a3=(180-a1)
a4=(a3/2)
a5=(180-90-a4)
a6=(a3-2*a5)
a7=(a6/2)
a1=radians(a1)
a2=radians(a2)
a3=Radians(a3)
a4=radians(a4)
a5=radians(a5)
a6=radians(a6)
a7=radians(a7)
#defining the lenths needed to define the points fof the star
M=abs(2*((K/2)*sin(a2)))
N=abs(M*sin(a5))
O=abs((K/2)-N)
P=abs((K/2)*sin(a1))
Q=abs(O*tan(a2))
R=abs((K/2)*sin(a4))
S=abs((Q*K)/M)
T=abs((2*Q*O)/M)
U=abs(M/2)
V=abs((2*Q*P)/M)
star=Polygon(Point(0,K/2),Point(Q, O),Point(P, O),Point(V,-T),
Point(U,-R),Point(0,-S),Point(-U,-R ),Point(-V,-T),
Point(-P, O),Point(-Q, O))
main()
How do I get the stars to go where they need to when i run it the flag shows up but now stars, what do you see that I may not see. thanks in advance
Answers: 3
Computers and Technology, 22.06.2019 18:30, dpinzoner5952
Which of the following commands is more recommended while creating a bot?
Answers: 1
Computers and Technology, 23.06.2019 08:30, mai1261
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
Computers and Technology, 24.06.2019 13:00, sparkyjones02
Which best describes the condition under which the unicode output is the same as plain text ?
Answers: 1
Using graphics. py to draw an American flag. Your flag should be draw according to the standard prop...
English, 26.01.2021 22:30
Mathematics, 26.01.2021 22:30
World Languages, 26.01.2021 22:30
English, 26.01.2021 22:30