Computers and Technology

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

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 24.06.2019 07:20, stephanieyingepbtcf8
3pointsyou've found an image you want to insert into your slide presentation. youwant to make the image look more gray so that it looks like an older imagewhat would you need to adjust? 0.00o a. sizeo b. hueo c. contrasto d. tones
Answers: 2
image
Computers and Technology, 24.06.2019 12:30, tragicteekaay
Nikki sent flyers in the mail to all houses within the city limits promoting her computer repair service what type of promotion is this and example of
Answers: 1
image
Computers and Technology, 25.06.2019 01:00, shonesam98
Regular maintenance is a key component of automotive lift safety.
Answers: 1
image
Computers and Technology, 25.06.2019 05:10, Aaraar
Maia notices that her paragraphs are too close to one another. she wants to increase this space. which arrangement of steps does maia follow after she goes to the paragraph command group in the ribbon? type in the space needed, go to the after menu, go to the spacing part of the box, and open the paragraph dialog box. go to the spacing part of the box, go to the after menu, open the paragraph dialog box, and type in the space needed. open the paragraph dialog box, go to the spacing part of the box, go to the after menu, and type in the space needed. type in the space needed, open the paragraph dialog box, go to the after menu, and go to the spacing part of the box.
Answers: 1
Do you know the correct answer?
Using graphics. py to draw an American flag. Your flag should be draw according to the standard prop...

Questions in other subjects:

Konu
Mathematics, 03.04.2020 01:39
Konu
Health, 03.04.2020 01:39