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 result of calling the greet function defined as: def greet(): print('Hello!')?
Think about what the function outputs when called.
What is the syntax to call a function in Python?
Remember, what do you type to execute a function by its name?
What is the syntax for calling a function in Python?
Think about how you refer to functions in the code.
True or False: You can call a function multiple times in your code.
Consider if there's any limit to using functions within your scripts.
Design a function that takes a string and returns it reversed. Provide an example of how you would call this function.
Think about how slicing works in Python.
Create a multi-step function that checks if a number is even, and returns 'Even' or 'Odd' based on the result. Show how to call this function and interpret its output.
Use conditions to differentiate between even and odd.
5 more questions in this section. Enroll free to practise them all.
Enroll free