American flag vertical

need this code to show a vertical flag

import turtle

import time

# import length as length

TeenageMutantNinja = [login to view URL]()

# set the cursor/turtle speed. Higher value, faster is the turtle

# decide the shape of cursor/turtle

# flag height to width ratio is 1:1.9

flag_height = 250

flag_width = 475

# starting points

# start from the first quardant, half of flag width and half of flag height

start_x = -237

start_y = 125

# For red and white stripes (total 13 stripes in flag), each strip width will be flag_height/13 = 19.2 approx

stripe_height = flag_height / 13

stripe_width = flag_width

# length of one arm of star

star_size = 10

def draw_fill_rectangle(x, y, height, width, color):

TeenageMutantNinja.begin_fill()

TeenageMutantNinja.end_fill()

def draw_star(x, y, color, length):

TeenageMutantNinja.begin_fill()

for turn in range(0, 5):

TeenageMutantNinja.end_fill()

# this function is used to create 13 red and white stripes of flag

def draw_stripes():

x = start_x

y = start_y

# we need to draw total 13 stripes, 7 red and 6 white,

# so we first create, 6 red and 6 white stripes alternatively

for stripe in range(0, 6):

for color in ["red", "white"]:

draw_fill_rectangle(x, y, stripe_height, stripe_width, color)

# decrease value of y by stripe_height

y = y - stripe_height

# create last red stripe

draw_fill_rectangle(x, y, stripe_height, stripe_width, 'red')

y - stripe_height

# this function create navy color square

# height = 7/13 of flag_height

# width = 0.76 * flag_height

# check references section for these values

def draw_square():

square_height = 131

square_width = 0.76 * flag_height

draw_fill_rectangle(start_x, start_y, square_height, square_width, 'navy')

def draw_six_stars_rows():

gap_between_stars = 30

gap_between_lines = stripe_height + 6

y = 112

# create 5 rows of stars

for row in range(0, 5):

x = -222

# create 6 stars in each row

for star in range(0, 6):

draw_star(x, y, 'white', star_size)

x = x + gap_between_stars

y = y - gap_between_lines

def draw_five_stars_rows():

gap_between_stars = 30

gap_between_lines = stripe_height + 6

y = 100

# create 4 rows of stars

for row in range(0, 4):

x = -206

# create 5 stars in each row

for star in range(0, 5):

draw_star(x, y, 'white', star_size)

x = x + gap_between_stars

y = y - gap_between_lines

# start after 5 seconds.

# draw 13 stripes

draw_stripes()

# draw squares to hold stars

draw_square()

# draw 30 stars, 6 * 5

draw_six_stars_rows()

# draw 20 stars, 5 * 4. total 50 stars representing 50 states of the USA draw_five_stars_rows()

# hide the cursor/turtle

Sobre o Cliente:
( 0 comentários ) Liverpool, United States

ID do Projeto: #34010175

10 freelancers estão ofertando em média \$41 nesse trabalho

Fazeennazar

*** Python Expert for your project : To draw American Flag *** I read your project description very carefully. I have a deep understanding and experience in the areas of python that you mentioned. I've previously work Mais

\$30 USD em 1 dia
(180 Comentários)
7.0
nguyentuan90

Hi, I've read your description carefully. I have full experience with python I've also worked on several similar projects. So I can complete your project with high quality on time. Looking forward to hear more about th Mais

\$20 USD em 1 dia
(6 Comentários)
3.6
alamineee

Hi, Dear Employer, I have read your job post carefully. I can write clean validated Machine Learning code and make a device-supported M. File. I have over seven-plus years of experience at the ✔Machine Learning (ML) Mais

\$200 USD em 1 dia
(18 Comentários)
4.4
ngocnhan2790

Dear I'm interested to discuss more about your project after reading your description. I am Program developer with 7 years of experience. I have many experiences working on similar projects to develop image and audio p Mais

\$20 USD em 1 dia
(3 Comentários)
2.1
toanasahmed

Python Programmer - Hello there, I am a Python Programmer by profession and have been doing Turtle Library based projects for quite a while now. I got the experience you require for the project. You can visit my profi Mais

\$30 USD em 1 dia
(4 Comentários)
2.3
birukGetnet17

\$20 USD em 1 dia
(1 Comentário)
1.4
Nakroxis

I am a python developer and a mechatronics engineering student. I have experience with Numpy, Pandas, OpenCV, MySQL, Flask, Tkinter, Arduino and Raspberry Pi. I would love to help you with your projects.

\$25 USD em 1 dia
(1 Comentário)
1.2
brettkulh

⭐Python Developer ⭐ I have many experience of developing python project including app and web. I am very familiar with turtle. Looking forward to hearing from you. Thank you.

\$20 USD em 1 dia
(0 Comentários)
0.0