::: {#navbar .navbar .navbar-default .navbar-fixed-top role="navigation"}
::: {.container}
::: {.navbar-header}
[]{.icon-bar} []{.icon-bar} []{.icon-bar}

<div>

[![](../_static/img/RAIcon.png)](/runestone/default/user/login){.brand-logo}
[fopp](../index.html){#rs-book-toc-link .navbar-brand}

</div>
:::

::: {.navbar-collapse .collapse .navbar-ex1-collapse}
-   
-   []{#ad_warning}
-   []{#browsing_warning}
-   
-   [*[Search]{.visuallyhidden
    aria-label="Search"}*](#){.dropdown-toggle}
    -   [Table of Contents](../index.html)

    -   [Book Index](../genindex.html)

    -   

    -   ::: {.input-group}
        :::
-   
-   [*[User]{.visuallyhidden aria-label="User"}*](#){.dropdown-toggle}
    -   []{.loggedinuser}

    -   

    -   [Course Home](/ns/course/index)

    -   [Assignments](/assignment/student/chooseAssignment)

    -   [Practice](/runestone/assignments/practice)

    -   [[Peer Instruction
        (Instructor)](/runestone/peer/instructor.html)]{#inst_peer_link}

    -   [Peer Instruction (Student)](/runestone/peer/student.html)

    -   

    -   [Change Course](/runestone/default/courses)

    -   

    -   [[Instructor\'s
        Page](/runestone/admin/index)]{#ip_dropdown_link}

    -   [Progress Page](/runestone/dashboard/studentreport)

    -   

    -   [Edit Profile](/runestone/default/user/profile){#profilelink}

    -   [Change
        Password](/runestone/default/user/change_password){#passwordlink}

    -   [Register](/runestone/default/user/register){#registerlink}

    -   [Login](#)

    -   ::: {.slider .round}
        :::

        Dark Mode
-   
-   [[*[Scratch Activecode]{.visuallyhidden
    aria-label="Scratch Activecode"}*](javascript:runestoneComponents.popupScratchAC())]{#scratch_ac_link}
-   
-   [*[Help]{.visuallyhidden aria-label="Help"}*](#){.dropdown-toggle}
    -   [FAQ](http://runestoneinteractive.org/pages/faq.html)
    -   [Instructors Guide](https://guide.runestone.academy)
    -   
    -   [About Runestone](http://runestoneinteractive.org)
    -   [Report A
        Problem](/runestone/default/reportabug?course=fopp&page=Exercises)
-   

```{=html}
<!-- -->
```
-   
-   [This Chapter](../index.html){.dropdown-toggle}
    -   [5.1 Hello Little
        Turtles!](intro-HelloLittleTurtles.html){.reference .internal}
    -   [5.2 Our First Turtle
        Program](OurFirstTurtleProgram.html){.reference .internal}
    -   [5.3 Instances: A Herd of
        Turtles](InstancesAHerdofTurtles.html){.reference .internal}
    -   [5.4 Object Oriented Concepts](ObjectInstances.html){.reference
        .internal}
    -   [5.5 Repetition with a For
        Loop](RepetitionwithaForLoop.html){.reference .internal}
    -   [5.6 A Few More turtle Methods and
        Observations](AFewMoreturtleMethodsandObservations.html){.reference
        .internal}
    -   [5.7 Summary of Turtle
        Methods](SummaryOfTurtleMethods.html){.reference .internal}
    -   [5.8 👩‍💻 Incremental
        Programming](WPIncrementalProgramming.html){.reference
        .internal}
    -   [5.9 👩‍💻 Common turtle
        Errors](WPCommonTurtleErrors.html){.reference .internal}
    -   [5.10 Exercises](Exercises.html){.reference .internal}
    -   [5.11 Chapter Assessment - Turtle and Object
        Mechanics](week1a3.html){.reference .internal}
-   
-   
:::
:::
:::

::: {#continue-reading .container}
:::

::: {#main-content .container role="main"}
::: {#adcopy_1 .adcopy style="display: none;"}
#### Before you keep reading\...

Runestone Academy can only continue if we get support from individuals
like you. As a student you are well aware of the high cost of textbooks.
Our mission is to provide great books to you for free, but we ask that
you consider a \$10 donation, more if you can or less if \$10 is a
burden.

::: {.donateb}
[Support Runestone Academy Today](/runestone/default/donate?ad=1){.btn
.btn-info}
:::

::: {#adcopy_2 .adcopy style="display: none;"}
#### Before you keep reading\...

Making great stuff takes time and \$\$. If you appreciate the book you
are reading now and want to keep quality materials free for other
students please consider a donation to Runestone Academy. We ask that
you consider a \$10 donation, but if you can give more thats great, if
\$10 is too much for your budget we would be happy with whatever you can
afford as a show of support.

::: {.donateb}
[Support Runestone Academy Today](/runestone/default/donate?ad=2){.btn
.btn-info}
:::
:::
:::

::: {#exercises .section}
[5.10. ]{.section-number}Exercises[¶](#exercises "Permalink to this heading"){.headerlink}
==========================================================================================

::: {#turtle_ex_1 .full-width .container .question component="question" question_label="5.10.1"}
1.  ::: {#q1 .alert .alert-warning component="tabbedStuff"}
    ::: {component="tab" tabname="Question"}
    ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_1 component="activecode" question_label="5.10.2"}
    ::: {#ac3_8_1_question .ac_question}
    Write a program that prints `We like Python's turtles!`{.docutils
    .literal .notranslate} 100 times.
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Answer"}
    ::: {.runestone .explainer .ac_section}
    ::: {#answer3_8_1 component="activecode" question_label="5.10.3"}
    ::: {#answer3_8_1_question .ac_question}
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Discussion"}
    [Show Comments](#disqus_thread){.disqus_thread_link}
    :::
    :::
:::

::: {#turtle_ex_2 .full-width .container .question component="question" question_label="5.10.4"}
2.  ::: {.runestone}
    ::: {#turtle_reflect .journal component="shortanswer" question_label="5.10.5"}
    Turtle objects have methods and attributes. For example, a turtle
    has a position and when you move the turtle forward, the position
    changes. Think about the other methods shown in the Summary of
    Turtle Methods page. Which attibutes, if any, does each method
    relate to? Does the method change the attribute?
    :::
    :::
:::

::: {#turtle_ex_3 .full-width .container .question component="question" question_label="5.10.6"}
3.  ::: {#q3 .alert .alert-warning component="tabbedStuff"}
    ::: {component="tab" tabname="Question"}
    ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_3 component="activecode" question_label="5.10.7"}
    ::: {#ac3_8_3_question .ac_question}
    Use `for`{.docutils .literal .notranslate} loops to make a turtle
    draw these regular polygons (regular means all sides the same
    lengths, all angles the same):

    -   An equilateral triangle

    -   A square

    -   A hexagon (six sides)

    -   An octagon (eight sides)
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Answer"}
    ::: {.highlight-python .notranslate}
    ::: {.highlight}
        # draw an equilateral triangle
        import turtle

        wn = turtle.Screen()
        norvig = turtle.Turtle()

        for i in range(3):
            norvig.forward(100)

            # the angle of each vertice of a regular polygon
            # is 360 divided by the number of sides
            norvig.left(360/3)

        wn.exitonclick()
    :::
    :::

    ::: {.highlight-python .notranslate}
    ::: {.highlight}
        # draw a square
        import turtle

        wn = turtle.Screen()
        kurzweil = turtle.Turtle()

        for i in range(4):
            kurzweil.forward(100)
            kurzweil.left(360/4)

        wn.exitonclick()
    :::
    :::

    ::: {.highlight-python .notranslate}
    ::: {.highlight}
        # draw a hexagon
        import turtle

        wn = turtle.Screen()
        dijkstra = turtle.Turtle()

        for i in range(6):
            dijkstra.forward(100)
            dijkstra.left(360/6)

        wn.exitonclick()
    :::
    :::

    ::: {.highlight-python .notranslate}
    ::: {.highlight}
        # draw an octogon
        import turtle

        wn = turtle.Screen()
        knuth = turtle.Turtle()

        for i in range(8):
            knuth.forward(75)
            knuth.left(360/8)

        wn.exitonclick()
    :::
    :::
    :::

    ::: {component="tab" tabname="Discussion"}
    [Show Comments](#disqus_thread){.disqus_thread_link}
    :::
    :::
:::

::: {#turtle_ex_4 .full-width .container .question component="question" question_label="5.10.8"}
4.  ::: {#q4 .alert .alert-warning component="tabbedStuff"}
    ::: {component="tab" tabname="Question"}
    ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_4 component="activecode" question_label="5.10.9"}
    ::: {#ac3_8_4_question .ac_question}
    Write a program to draw a shape like this:

    ![](../_images/star.png)
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Answer"}
    ::: {.runestone .explainer .ac_section}
    ::: {#answer3_8_4 component="activecode" question_label="5.10.10"}
    ::: {#answer3_8_4_question .ac_question}
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Discussion"}
    [Show Comments](#disqus_thread){.disqus_thread_link}
    :::
    :::
:::

::: {#turtle_ex_5 .full-width .container .question component="question" question_label="5.10.11"}
5.  ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_5 component="activecode" question_label="5.10.12"}
    ::: {#ac3_8_5_question .ac_question}
    Write a program to draw a face of a clock that looks something like
    this:

    ![](../_images/tess_clock1.png)
    :::
    :::
    :::
:::

::: {#turtle_ex_6 .full-width .container .question component="question" question_label="5.10.13"}
6.  ::: {#q6 .alert .alert-warning component="tabbedStuff"}
    ::: {component="tab" tabname="Question"}
    ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_6 component="activecode" question_label="5.10.14"}
    ::: {#ac3_8_6_question .ac_question}
    Write a program to draw some kind of picture. Be creative and
    experiment with the turtle methods.
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Answer"}
    ::: {.runestone .explainer .ac_section}
    ::: {#answer3_8_6 component="activecode" question_label="5.10.15"}
    ::: {#answer3_8_6_question .ac_question}
    :::
    :::
    :::
    :::

    ::: {component="tab" tabname="Discussion"}
    [Show Comments](#disqus_thread){.disqus_thread_link}
    :::
    :::
:::

::: {#turtle_ex_7 .full-width .container .question component="question" question_label="5.10.16"}
7.  ::: {.runestone .explainer .ac_section}
    ::: {#ac3_8_7 component="activecode" question_label="5.10.17"}
    ::: {#ac3_8_7_question .ac_question}
    Create a turtle and assign it to a variable. When you print its
    type, what do you get?
    :::
    :::
    :::
:::

::: {#contributed-exercises .section}
[5.10.1. ]{.section-number}Contributed Exercises[¶](#contributed-exercises "Permalink to this heading"){.headerlink}
--------------------------------------------------------------------------------------------------------------------
:::
:::

::: {style="width: 100%"}
::: {ea-publisher="runestoneacademy" ea-type="image" style="display: flex; justify-content: center"}
:::
:::

::: {#scprogresscontainer}
You have attempted []{#scprogresstotal} of []{#scprogressposs}
activities on this page

::: {#subchapterprogress aria-label="Page progress"}
:::
:::

-   [[](WPCommonTurtleErrors.html)]{#relations-prev}
-   [[](week1a3.html)]{#relations-next}
:::

::: {.container}
[]{#numuserspan}[]{.loggedinuser} \| [Back to top](#)

© Copyright 2017 bradleymiller. Created using
[Runestone](http://runestoneinteractive.org/) 7.2.10.
:::
