# Why is the apple's position 90?

**URL:** <https://forum.code.org/t/why-is-the-apples-position-90/36554>\
**Category:** CS Discoveries\
**Tags:** csd-unit-3\
**Created:** [June 8, 2022, 12:33pm UTC](https://forum.code.org/t/why-is-the-apples-position-90/36554 "2022-06-08T12:33:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dlgleason](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dlgleason](https://forum.code.org/u/dlgleason)\
**Post date:** [June 8, 2022, 12:33pm UTC](https://forum.code.org/t/why-is-the-apples-position-90/36554/1 "2022-06-08T12:33:20Z")

</div>

Why is the apple’s position 90 in the Unit 3 assessment? How can I explain this to my students.  
Consider the following program (blocks and text)

![](https://assets.learnosity.com/organisations/154/6fdb0aa7-cb14-4a2e-b409-227dc23f2b42.PNG)

What is the apple’s x position at the end of this program?

---

<div class="post-metadata">

**Author:** ![paul.rallion](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/paul.rallion/32/7218_2.png) [@paul.rallion](https://forum.code.org/u/paul.rallion)\
**Post date:** [June 8, 2022, 5:19pm UTC](https://forum.code.org/t/why-is-the-apples-position-90/36554/2 "2022-06-08T17:19:59Z")

</div>

Hi dlgleason,  
Even though the apple’s 🍎 position is initially 20, it is then updated by the value of the banana 🍌 , which is 60 and then added 30, giving you the resulting value of 90.

---

<div class="post-metadata">

**Author:** ![paul.rallion](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/paul.rallion/32/7218_2.png) [@paul.rallion](https://forum.code.org/u/paul.rallion)\
**Post date:** [June 8, 2022, 5:41pm UTC](https://forum.code.org/t/why-is-the-apples-position-90/36554/3 "2022-06-08T17:41:52Z")

</div>

By the way, welcome to our community! 👋🏼

---

<div class="post-metadata">

**Author:** ![CeciliaZ](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/ceciliaz/32/7000_2.png) [@CeciliaZ](https://forum.code.org/u/CeciliaZ)\
**Post date:** [June 8, 2022, 9:39pm UTC](https://forum.code.org/t/why-is-the-apples-position-90/36554/4 "2022-06-08T21:39:48Z")

</div>

If they thought it was 100, the explanation would be that the computer does the computation line by line. When it gets to line 3 it replaces apple.x with the current value of banana.x, which is 60, +30. It does not look ahead to the final value of banana.x in line 4.
