subject

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

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:30
Larry sent an email to andy. andy didn't open larry's email but still understood what the message was. how did andy determine the message without opening the email?
Answers: 1
question
Computers and Technology, 23.06.2019 11:50
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
question
Computers and Technology, 23.06.2019 19:00
Acompany is hiring professionals for web designing. the firm is small with few resources. they want employees who possess problem-solving skills and can independently carry out responsibilities. which kind of employee should they select?
Answers: 2
question
Computers and Technology, 24.06.2019 10:00
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
You know the right answer?
Using graphics. py to draw an American flag. Your flag should be draw according to the standard prop...
Questions
Questions on the website: 13722361