What is the code for drawing a hexagon on python programming?

Answers

Answer 1

Answer:

In this article, we will learn how to make a Hexagon using Turtle Graphics in Python. For that lets first know what is Turtle Graphics.

Turtle graphics

Turtle is a Python feature like a drawing board, which let us command a turtle to draw all over it! We can use many turtle functions which can move the turtle around. Turtle comes in the turtle library.The turtle module can be used in both object-oriented and procedure-oriented ways.

Some of the commonly used methods are:

forward(length): moves the pen in the forward direction by x unit.

backward(length): moves the pen in the backward direction by x unit.

right(angle): rotate the pen in the clockwise direction by an angle x.

left(angle): rotate the pen in the anticlockwise direction by an angle x.

penup(): stop drawing of the turtle pen.

pendown(): start drawing of the turtle pen.

Approach –

Define an instance for turtle.

For a hexagon execute a loop 6 times.

In every iteration move turtle 90 units forward and move it left 300 degrees.

This will make up Hexagon .

Below is the python implementation of above approach.


Related Questions

____ is an easy way to invitation through a web page​

Answers

Answer:

RSVP?

Explanation:

RSVP is the answer........
Other Questions
Patrick will borrow $4300 at 11.5% APR. He will pay it back over 5 years. What will his monthly payment be? (Use the table.)$94.56$96.79$123.21$141.81 Read the passage from "Perseus.It happened that soon after their arrival Perseus heard that the King of Larissa, in the North, was holding a great athletic contest, and he journeyed there to take part. In the discus-throwing when his turn came and he hurled the heavy missile, it swerved and fell among the spectators."Perseus, Edith HamiltonWhich ancient Greek value does Perseus demonstrate in this passage?A. Perseus shows wisdom.B. Perseus shows strength.C. Perseus shows courage.D. Perseus shows hospitality. 11. Amiduele la cabeza.12. A tiinteresa ir de camping?13. A nosotrasgusta nadar en la piscina en verano.14. (to them feminine)les aburre la leccin de piano.15. A ellagusta hablar por telfono con sus amigas.o He read the newspaper. What is the best way to write the bolded words in Spanish? A. Ley B. Leo C. Leyeron D. Lee by what percent would a number change if it increased by 5% and the result was also increased by 5% What is the value of r?r= 4 ftr= 8 ftr = 16 ftr = 32 ft Characters you may need that are not on your keyboard are provided below for you to copy and paste into the blanks. Put the correct helping verb haben or sein into the sentence.1. Gestern ich sehr mde gewesen.2. Meine Mutter Pizza gebacken.3. Mein Bruder mein Fahrrad repariert.4. Ihr eine neue CD gekauft.5. Katja ihre Tante besucht.6. Klaus gestern um 6.00 aufgestanden.7. Du einen Roman gelesen.8. Ich schon zwei Jahre Deutsch gelernt.9. Claudia das ganze Wochenende zu Hause geblieben.10. Am Samstag wir Fuball gespielt.11. Peter nach Hamburg gefahren. The diameter of a cylinder is 26 yards. Find the volume of the cylinder, if it's height is 29 yards. IN 2013 The number of students in a small school is 284. it is estimated that the student population will increase by 4% every year. write formula for student population and estimate student population in 2020 there are 4 triangles, 12 sqaures and 6 circles. What is the ratio of squares to circles? Simplify. (B)Fill in the blanks with appropriate forms of the adjectives from the brackets.2My friend is ___(old) than I am, yet he is not so (clever)as I am. Of course, Ranjan is the(intelligent) girl in our class, but I havenever scored( little) marks than her in any examination. Which type of scientist studies how to use plants for food, medicine and other products?Pls help fast !!!!!!!!!!pleaseeeee Please help I really don't wanna fail this is so hard I will give brainliest to the person with the CORRECT ANSWERS !Please don't do it for the points : 3N and 3N+3 are two consecutive multiples of three.a The sum of the two numbers is 141. Write down an equation to show this.b Solve the equation to find the value of Nc Work out the values of the two initial numbers. 15) Volume of a cuboid with base area 500 m2 and height 4m is. with steps please help middle school comprehension what was the result of the investiture controversy in the roman empire STUDENTS WORK ETHIC AFFECTED Which of the following best describes a central idea of the text Bro pls help em bro pls help me bro Here is a story: Lin bought 4 bags of apples. Each bag had the same number of apples. After eating 1 apple from each bag, she had 28 apples left.Which diagram best represents the story? Explain why the diagram represents it.What part of the story does xrepresent?Describe how you would find the unknown amount in the story