Kapalı

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

[login to view URL](100)

[login to view URL]()

# decide the shape of cursor/turtle

[login to view URL]("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):

[login to view URL](x, y)

[login to view URL]()

[login to view URL](color)

TeenageMutantNinja.begin_fill()

[login to view URL](width)

[login to view URL](90)

[login to view URL](height)

[login to view URL](90)

[login to view URL](width)

[login to view URL](90)

[login to view URL](height)

[login to view URL](90)

TeenageMutantNinja.end_fill()

[login to view URL]()

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

[login to view URL](x, y)

[login to view URL](0)

[login to view URL]()

TeenageMutantNinja.begin_fill()

[login to view URL](color)

for turn in range(0, 5):

[login to view URL](length)

[login to view URL](144)

[login to view URL](length)

[login to view URL](144)

TeenageMutantNinja.end_fill()

[login to view URL]()

# 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.

[login to view URL](5)

# 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

[login to view URL]()

[login to view URL](100)

Beceriler: Python

Müşteri Hakkında:
( 0 değerlendirme ) Liverpool, United States

Proje NO: #34010175

Bu iş için 10 freelancer ortalamada $41 teklif veriyor

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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(180 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(6 Değerlendirme)
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) Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(18 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(3 Değerlendirme)
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 Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(4 Değerlendirme)
2.3
birukGetnet17

Hello sir. I have ready made American flag drawer python script. Please chat with me. Looking forward to your response. Thank You!!!

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(1 Yorum)
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.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(1 Yorum)
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.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
pbhadu36

Hey there, understood your requirement, It's a straight forward change, can help with you it, share the code and you will have what you want.

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0
DmitryDohonov

Hello, this is my first freelance job, but I will be glad to receive it, ready to work for the minimum price, and do it as quickly as possible. I have a lot of experience with Python, and I have a complete understandin Daha Fazla

1 gün içinde %bids___i_sum_sub_32%%project_currencyDetails_sign_sub_33% USD
(0 Değerlendirme)
0.0