# Unit 5 Assessment 1 Question 9

**URL:** <https://forum.code.org/t/unit-5-assessment-1-question-9/24903>\
**Category:** Unit and Lesson Discussion\
**Created:** [February 17, 2019, 7:51pm UTC](https://forum.code.org/t/unit-5-assessment-1-question-9/24903 "2019-02-17T19:51:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![christinarconnor](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@christinarconnor](https://forum.code.org/u/christinarconnor)\
**Post date:** [February 17, 2019, 7:51pm UTC](https://forum.code.org/t/unit-5-assessment-1-question-9/24903/1 "2019-02-17T19:51:37Z")

</div>

The answer to question 9 is “C”, however the for-loop in the question repeats until “i \< 4”, so the loop repeats 3 times. How can the answer be C which requires the loop to repeat 4 times? Please let me know what I’m missing. Thanks in advance.

---

<div class="post-metadata">

**Author:** ![jadams1](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jadams1/32/4835_2.png) [@jadams1](https://forum.code.org/u/jadams1)\
**Post date:** [February 17, 2019, 8:27pm UTC](https://forum.code.org/t/unit-5-assessment-1-question-9/24903/2 "2019-02-17T20:27:16Z")

</div>

@christinarconnor

var i = 0 so the variable count starts at 0 with the first iteration. With each iteration 1 is added to the count, so the count goes 0, 1, 2, 3.

I’ve attached a screenshot. Hopefully it helps.

 ![Screenshot_2019-02-17%20Check%20out%20what%20I%20made](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/2/226c9c7b8130e435428f6a459915d575e63d6a91.png)

---

<div class="post-metadata">

**Author:** ![christinarconnor](https://avatars.discourse-cdn.com/v4/letter/c/f4b2a3/32.png) [@christinarconnor](https://forum.code.org/u/christinarconnor)\
**Post date:** [February 17, 2019, 9:12pm UTC](https://forum.code.org/t/unit-5-assessment-1-question-9/24903/3 "2019-02-17T21:12:45Z")

</div>

Thanks. After thinking it through I guess the best way to explain it to students is that the “counter” doesn’t tick “1” until after having run the function the first time. Appreciate the reply.

---

<div class="post-metadata">

**Author:** ![jadams1](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jadams1/32/4835_2.png) [@jadams1](https://forum.code.org/u/jadams1)\
**Post date:** [February 17, 2019, 9:36pm UTC](https://forum.code.org/t/unit-5-assessment-1-question-9/24903/4 "2019-02-17T21:36:04Z")

</div>

Glad I could help! 😃
