皇冠足球体育

If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Unit 4: Playing games with functions

View my programsTop programs

About this unit

How do teams of programmers continuously write and revise code without breaking things? Learn how to break down programs into smaller, independent functions that can be easily read, reused, and tested. Design and write function definitions with parameters and return values as you develop your own game components.

Can you break down a program into smaller pieces?
What happens when a function calls another function?
An organized programmer is a happy programmer.
How can you be sure that your function works?
Players have short attention spans. Can you keep them engaged?