Programming ConceptsLesson 8Free preview
Functions
This lesson is part of Intro to Programming · All levels
Summary
This lesson discusses functions as named code blocks that can be called over and over to perform a particular task. A function can receive parameters as inputs and return values via return. With the functionality, the code becomes more organized, easier to test, and doesn't repeat the same block.
Key points
- Functions are named code blocks that can be called over and over again.
- Parameters are inputs and arguments are the actual values.
- Returns the result and ends the function
- Function to minimize duplication and facilitate testing
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.