Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the keyword used to define a function in Python?
Think about what word comes before the function name.
How do you call a function named 'say_hi'?
What do you write to execute the function?
What does the def keyword do in Python?
Think about how we initiate a function.
True or False: You can call a function by writing just its name inside parentheses.
Recall the format for calling functions.
Create a function that checks if a number is even or odd and returns a string indicating the result.
Use the modulus operator to determine the answer.
Write a function to reverse a string and demonstrate calling it.
Think about how indexing works with strings.
5 more questions in this section. Enroll free to practise them all.
Enroll free