# Students struggling with functions

**URL:** <https://forum.code.org/t/students-struggling-with-functions/18511>\
**Category:** Unit and Lesson Discussion\
**Tags:** csp-unit-3, csp-unit-3-lesson-5\
**Created:** [August 3, 2018, 5:40pm UTC](https://forum.code.org/t/students-struggling-with-functions/18511 "2018-08-03T17:40:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![torri.egan](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@torri.egan](https://forum.code.org/u/torri.egan)\
**Post date:** [August 3, 2018, 5:40pm UTC](https://forum.code.org/t/students-struggling-with-functions/18511/1 "2018-08-03T17:40:30Z")

</div>

My students are struggling to figure out functions. They aren’t understanding the concepts. The unplugged activities confused them further. Any teaching ideas or unplugged ideas to help them?

---

<div class="post-metadata">

**Author:** ![anmrobnott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/anmrobnott/32/505_2.png) [@anmrobnott](https://forum.code.org/u/anmrobnott)\
**Post date:** [August 3, 2018, 10:41pm UTC](https://forum.code.org/t/students-struggling-with-functions/18511/2 "2018-08-03T22:41:48Z")

</div>

@torri.egan  
With this lesson, I found students struggled with the planning that required them to analyze first Then, plan, Then, code. Although the steps to create the diamond are broken down, I found them resistant to doing it that way.

Two things I tried:

1. let them solve it the long way and develop the need for functions at their own pace.
2. I made a rule of 10 - you couldn’t have any runs of code longer than 10 lines. After a bit, they seemed to plan ahead more instead of revising afterward. There was no magic about 10 lines. I would change the number for different situations or even to individual students as a challenge.

It would be great to hear what others have experienced and the strategies used.

Happy computing,  
Andrea
