Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6858783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:12:09+00:00 2026-05-27T02:12:09+00:00

I am very new to python. I need to draw this shape for college

  • 0

I am very new to python. I need to draw this shape for college but i find it really hard so i am trying to do square before going into that image.

Anyway here is my question: How can i have 8 rows? (There are 8 square in 1 row) I can not keep adding def start_point1(): This wouldn’t be the proper way to do it.

enter image description here

#!/usr/bin/python

import turtle as t
import time

def start_point():
    t.penup()
    t.setpos(-200,-240)
    t.pendown()

def start_point1():
    t.penup()
    t.setpos(-200,-180)
    t.pendown()

def draw_turtle():
    for a in range(4):
        t.forward(60)
        t.left(90)

def draw_turtlerow():
    for a in range(8):
        draw_turtle()
        t.forward(60)



def main():
    start_point()
    draw_turtlerow()
    start_point1()
    draw_turtlerow()
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:12:09+00:00Added an answer on May 27, 2026 at 2:12 am

    In this kind of problems, you should ask yourself what is the “atomic” operation that – repeated over and over – will generate your complete solution. You already found your basic “atom”: drawing a side of a square:

    t.forward(60)
    

    Now, what is the next level of “atomicity”? Well, repeating four times a side, you can get a square (as you correctly found out yourself)

    for a in range(4):
        t.forward(60)
        t.left(90)
    

    Now along the same lines, you might come to the conclusion that if you repeat 8 times the above, you get a line, and if you repeat 8 times a line you’ll get a complete check board. It should be something like:

    for col in range(8):
        for row in range(8):
            # draw a square here
    

    Now, you already wrote yourself the function to draw a square, the only problem is that you would need to draw each of them at different locations. The key point you have to focus here is: can you think of a method to calculate this location starting from the values of col and row?

    If you get stuck, I posted a sample implementation here, I’m confident you won’t need to check that out, but if you do, here’s the extra assignment: instead of using that code as-is, turn the inner circle in a call to a separate function draw_square(row, col).

    EDIT: For extra points and pride, once completed the exercise, observe how most lines in the check board are redrawn over and over. With very little effort you can double the efficiency of your program. Can you think how?

    HTH!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm relatively new to the Python world, but this seems very straight forward. Google
I am still very new to python, but I need to interface with some
I'm very new to Python, but I need to migrate a project from PHP
I am very new to Python, and trying to figure out how to create
I'm new to python so I really don't know the language very well. the
I am very new to Python, I need to read numbers from a file
To preface I'm very new to python (about 7 days) but I'm an experienced
I will confess I'm very new to Python and I don't really know what
I'm (very) new to all of this programming stuff and I need help with
I'm very new to python. I need a simple and clear script to add

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.