Write a Python program that makes a turtle draw the shape below, which consists of 8 squares in a row:

Answers

Answer 1

Answer:

import turtle

window = turtle.Screen()

turtle.speed(0)

turtle.pensize(5)

def draw_square():

   times_drawn = 0

   

   # position on the 'x' access.

   x = -350

   

   # while the amount of times drawn is less than or equal to 8 the square gets drawn.

   while times_drawn <= 8:

       

       # increases the 'x' value by 75.

       x += 75

       times_drawn += 1

       turtle.penup()

       turtle.goto(x, 0)

       turtle.pendown()

       turtle.color("black")

       

       # for loop that draws the square.

       for i in range(4):

           turtle.forward(50)

           turtle.left(90)

       turtle.penup()

draw_square()

turtle.done()

Explanation:


Related Questions

can someone help me im using python IDLE and im getting this message in the output what does this mean "Error: unindent does not match any outer indentation level"

Answers

Answer:

Indent the first line

Explanation:

In many types of coding, the process does not work until you indent the first line. If it is a few rows in programs such as loops many more indentations maybe needed.

Answer:

Indent the first line

Explanation:

In many types of coding, the process does not work until you indent the first line. If it is a few rows in programs such as loops many more indentations maybe needed.

Fill in the blanks:
a. Jacquard's loom was based on ________ .
b. The value of each bead of _________ an abacus is equal to five.

Pls help me ....i need answers as fast as possible...
I will mark as brainliest.

Answers


Answer

1st blank = waving
2nd blank= upper deck

Answers:

A) a system of cards, needles and hooks

B) bottom deck in

Hope this helps!

Write at least complete set of HTML code to hyperlink to “Home.html”..

Answers

Answer:

HTML Link Colors

By default, a link will appear like this (in all browsers):

An unvisited link is underlined and blue

A visited link is underlined and purple

An active link is underlined and red

You can change the link state colors, by using CSS:

Answer:

<!DOCTYPE html>

Explanation:

What kind of power does Tesla Model S, 3 X, and Y use?


A: Electricity only

B: Both gas/diesel and electricity

C: Just gas/diesel

Note: There is only one correct answer.

Answers

A

That is it for that
answer is a, as tesla only uses electricity since it is an electric vehicle !
Other Questions
90 units needed 8per case HELP PLEASEWhich of the following shows that the quadrilateral with vertices A (3, 1), B(0, 6), C (4,7),and D (7, 2) is a parallelogram? What is the result of converting 60 ounces to pounds? Remember, there are16 ounces in a poundO A 375 poundsB. 5 poundsco poundsO 0 4 25 pounds Which president, Theodore Roosevelt or Woodrow Wilson, was the more successful in domestic policy? 3. A fine-dining restaurant has been making every- thing from scratch for the five years it has been open; it is the only operation in the area known for scratch- cooking. The management hires a new chef who does a makebuy analysis only to discover that she can get much better pricing on many of her products if she buys them premade. After a tasting comparison, she discovers that the premade products are of high quality and taste only slightly different from her own. Should she switch to the premade products? Would your answer be different if this decision took place when the restaurant first opened? What are the coordinates of P?(b,0 a,00,a0,b The movement of the progress bar may be uneven because questions can be worth more or less (includingWhich sentence is punctuated correctly?Watch out for the falling branches overhead?Watch out for the falling branches overhead,Watch out for the falling branches overhead.Watch out for the falling branches overhead! Alvins first step in solving the given system of equations is to multiply the first equation by 2 and the second equation by 3. Which linear combination of Alvins system of equations reveals the number of solutions to the system?9x + 4y = 366x + 2.5y = 24Infinite solutions: 0x 0y = 0No solutions: 0x + 15.5y = 144One solution: 0x + 0.5y = 0Two solutions: 0x 0.5y = 60 find a number such that when 3/4 of it is added to 3.5 the sum is the same as when 2/3 of it is subtracted from 6.5 A chef mix his salt and pepper. If he put 2/3 cup of salt and 1/2 cup of pepper in his shaker, what is the ratio of salt to pepper ? Describe the relationship between Bev and Ezze. Please HELPPP Complete the equation describing how xand y are related. y = [? ]x +071 92 113 134 155 17Enter the answer thatbelongs in [?] The square root of 3/100 is between what two numbers How does Douglas is cultural point of you as slavery from the early 1800s shape as motivation to become literate, yet also create obstacles for him? provide at least two examples from the text right at least a 100 word response Create a Python dictionary that returns a list of values for each key. The key can be whatever type you want. Design the dictionary so that it could be useful for something meaningful to you. Create at least three different items in it. Invent the dictionary yourself. Do not copy the design or items from some other source. Next consider the invert_dict function. def invert_dict(d): inverse = dict() for key in d: val = d[key] if val not in inverse: inverse[val] = [key] else: inverse[val].append(key) return inverse Modify this function so that it can invert your dictionary. In particular, the function will need to turn each of the list items into separate keys in the inverted dictionary. Run your modified invert_dict function on your dictionary. Print the original dictionary and the inverted one. Describe what is useful about your dictionary. Then describe whether the inverted dictionary is useful or meaningful, and why. Mention four rules and regulations in the community. Write out a short conversation between two people who are meeting each other for the first time . Has to be three lines each 6. The skin on the leg is___________to the muscle in the leg There are 11 green marbles and 12 orange marbles in a bag. You randomlychoose one of the marbles. What is the probability of choosing a green marble? Read the article Skara Brae: Skara Brae is one of the oldest historical sites in Europe, and it stayed hidden for more than 4,000 years. The ancient village of Skara Brae was discovered on the main island of Orkney, in Scotland. A massive storm in 1850 removed the sand that had covered it for thousands of years, exposing the remains of a small village. Skara Brae is a collection of eight round, stone houses that still have their stone furnishings and even some of the belongings of the inhabitants. The contents can tell us a great deal about how people lived in what is called the Neolithic era, or the last period of the Stone Age. Seven of the eight houses appear to have been family homes, with beds, dressers, fireplaces, and even simple toilets. The eighth house may have been a community workshop. It shows evidence of tool-making and the use of a large fire pit. How was Skara Brae built, and what, eventually, happened to it