::: {#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=toctree)
-   

```{=html}
<!-- -->
```
-   
-   [This Chapter](../index.html){.dropdown-toggle}
    -   [8.1 Intro: What we can do with Turtles and
        Conditionals](intro-TurtlesandConditionals.html){.reference
        .internal}
    -   [8.2 Boolean Values and Boolean
        Expressions](BooleanValuesandBooleanExpressions.html){.reference
        .internal}
    -   [8.3 Logical operators](Logicaloperators.html){.reference
        .internal}
    -   [8.4 The in and not in
        operators](Theinandnotinoperators.html){.reference .internal}
    -   [8.5 Precedence of
        Operators](PrecedenceofOperators.html){.reference .internal}
    -   [8.6 Conditional Execution: Binary
        Selection](ConditionalExecutionBinarySelection.html){.reference
        .internal}
    -   [8.7 Omitting the else Clause: Unary
        Selection](OmittingtheelseClauseUnarySelection.html){.reference
        .internal}
    -   [8.8 Nested conditionals](Nestedconditionals.html){.reference
        .internal}
    -   [8.9 Chained conditionals](Chainedconditionals.html){.reference
        .internal}
    -   [8.10 The Accumulator Pattern with
        Conditionals](TheAccumulatorPatternwithConditionals.html){.reference
        .internal}
    -   [8.11 👩‍💻 Setting Up
        Conditionals](WPSettingUpConditionals.html){.reference
        .internal}
    -   [8.12 Glossary](Glossary.html){.reference .internal}
    -   [8.13 Exercises](Exercises.html){.reference .internal}
    -   [8.14 Chapter Assessment](week3a1.html){.reference .internal}
-   
-   
:::
:::
:::

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

::: {#main-content .container role="main"}
::: {#conditionals .section}
[8. ]{.section-number}Conditionals[¶](#conditionals "Permalink to this heading"){.headerlink}
=============================================================================================

::: {.toctree-wrapper .compound}
[Conditionals]{.caption-text}

-   [8.1. Intro: What we can do with Turtles and
    Conditionals](intro-TurtlesandConditionals.html){.reference
    .internal}
    -   [8.1.1. Learning
        Goals](intro-TurtlesandConditionals.html#learning-goals){.reference
        .internal}
    -   [8.1.2.
        Objectives](intro-TurtlesandConditionals.html#objectives){.reference
        .internal}
-   [8.2. Boolean Values and Boolean
    Expressions](BooleanValuesandBooleanExpressions.html){.reference
    .internal}
-   [8.3. Logical operators](Logicaloperators.html){.reference
    .internal}
    -   [8.3.1. Smart
        Evaluation](Logicaloperators.html#smart-evaluation){.reference
        .internal}
-   [8.4. The `in`{.docutils .literal .notranslate} and
    `not in`{.docutils .literal .notranslate}
    operators](Theinandnotinoperators.html){.reference .internal}
-   [8.5. Precedence of
    Operators](PrecedenceofOperators.html){.reference .internal}
-   [8.6. Conditional Execution: Binary
    Selection](ConditionalExecutionBinarySelection.html){.reference
    .internal}
-   [8.7. Omitting the `else`{.docutils .literal .notranslate} Clause:
    Unary
    Selection](OmittingtheelseClauseUnarySelection.html){.reference
    .internal}
-   [8.8. Nested conditionals](Nestedconditionals.html){.reference
    .internal}
-   [8.9. Chained conditionals](Chainedconditionals.html){.reference
    .internal}
-   [8.10. The Accumulator Pattern with
    Conditionals](TheAccumulatorPatternwithConditionals.html){.reference
    .internal}
    -   [8.10.1. Accumulating the Max
        Value](TheAccumulatorPatternwithConditionals.html#accumulating-the-max-value){.reference
        .internal}
-   [8.11. 👩‍💻 Setting Up
    Conditionals](WPSettingUpConditionals.html){.reference .internal}
    -   [8.11.1. Choosing your type of
        Conditional](WPSettingUpConditionals.html#choosing-your-type-of-conditional){.reference
        .internal}
-   [8.12. Glossary](Glossary.html){.reference .internal}
-   [8.13. Exercises](Exercises.html){.reference .internal}
    -   [8.13.1. Contributed
        Exercises](Exercises.html#contributed-exercises){.reference
        .internal}
-   [8.14. Chapter Assessment](week3a1.html){.reference .internal}
:::
:::

::: {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"}
:::
:::

-   [[](../Iteration/week2a2.html)]{#relations-prev}
-   [[](intro-TurtlesandConditionals.html)]{#relations-next}
:::

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

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