Functions


In the first week, you were introduced to state. In the second week, you were introduced to iteration, one of the more difficult programming constructs to grasp. In the third week, we discussed another programming construct: selection. Last week, we reinforced these topics while incorporating file handling. This week, we will use functions to produce an organised, maintainable word search puzzle program.

If you can develop a solution that utilises functions without help, attempt this now. If you would like some assistance, then work through this lab script. By the end, you will have created your own word search puzzle program!

image

Open Code Editor






Click here to go to the COMP16321 Blackboard page


Click anywhere to close this video

Contents




Green = Current Page

Click anywhere to close this overlay

Topics Covered in this Lab



1. Writing natural language solutions to programming problems.

2. Functions

3. User input.

4. Code folding using text editors.

5. 2D arrays

6. len() function

7. random methods (randint etc.)

8. Iteration

9. Selection



Click anywhere to close this overlay

Lab Key



Notes – #FF6F61

Videos – #34568B

Code Examples – #009B77

Downloads - #C3447A

Internal Link (University Resources) – #955251

External Link (Non-University Resources)– #EFC050

Other - #660099



Click anywhere to close this overlay