Knowing the different forms functions can have is critical to defining and using functions in your programs. Learn the different types of functions.
- [Instructor] Every function performs … a particular procedure. … Some functions take in some value, … which is also called input. … A function that receives input then performs a procedure … involving that input, … and some functions perform a procedure … resulting in a value, … which is also called output. … A function that has a result returns the output. … Now some functions neither receive an input, … nor return an output. … For example, if I wanted a function … that displays a simple greeting, I could do this. … I start with the def keyword … followed by the name of the function. … I'm going to go with greeting followed by parentheses. … I'm going to leave these parentheses empty … because this function is not going to take in an input. … And then a colon, hit enter to get to the next line, … and after the indent, I'll write print, … parentheses, hey there. … I'm going to go ahead and run this cell. … Now I'm going to call the function that I just created, … and I do that by typing out greeting …
This course was created by Madecraft. We are pleased to host this content in our library.
- What is Python?
- Strengths and benefits of Python
- Types of data
- Storing data using variables
- Built-in and custom functions
- Lists and tuples
- Conditional statements
- Iteration with loops
- Recursive functions
- Object-oriented programming
Skill Level Beginner
Learning the Python 3 Standard Librarywith Kathryn Hodge2h 9m Intermediate
Python Standard Library Essential Trainingwith Joe Marini2h 18m Intermediate
1. Defining Python
2. Fundamentals of Programming in Python: Data
3. Fundamentals of Programming in Python: Functions
4. Fundamentals of Programming in Python: Sequences
5. Fundamentals of Programming in Python: Conditional Statements
6. Fundamentals of Programming in Python: Iteration
7. Fundamentals of Programming in Python: Recursion
Define recursive functions6m 13s
8. Quick Intro to Object-Oriented Programming in Python
Next steps1m 8s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.