# Create Task-Function

**URL:** <https://forum.code.org/t/create-task-function/34650>\
**Category:** AP Prep\
**Created:** [April 29, 2021, 2:51pm UTC](https://forum.code.org/t/create-task-function/34650 "2021-04-29T14:51:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![margaret.birch](https://avatars.discourse-cdn.com/v4/letter/m/aca169/32.png) [@margaret.birch](https://forum.code.org/u/margaret.birch)\
**Post date:** [April 29, 2021, 2:51pm UTC](https://forum.code.org/t/create-task-function/34650/1 "2021-04-29T14:51:50Z")

</div>

I have a student who has a function with parameters. Separately, he has an IF statement and a loop but it’s not actually IN the function. Is this ok?

---

<div class="post-metadata">

**Author:** ![jdonwells](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jdonwells/32/7900_2.png) [@jdonwells](https://forum.code.org/u/jdonwells)\
**Post date:** [April 29, 2021, 4:30pm UTC](https://forum.code.org/t/create-task-function/34650/2 "2021-04-29T16:30:04Z")

</div>

I have read that the function with the parameter (and sequence) must call the function(s) with selection and loop. When submitting you must submit all the functions that make up the algorithm as a group with the function that takes a parameter at the top.

If you have a function and a bunch of unrelated code scattered about it doesn’t count.
