Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
Define a simple function that prints 'Hello, World!'
Use the 'def' keyword.
What is a global variable?
Think about its scope!
What can be used to define a function in Python?
It's how you start a function.
True or False: A local variable can be accessed outside of its function.
Think about where the variable was declared.
Design a recursive function that computes the Fibonacci sequence up to the nth term. Explain how it works.
Consider how the Fibonacci sequence is constructed.
Create a higher-order function that takes another function as an argument and applies it to a list of numbers. Provide an example.
Think about how to iterate and apply transformations.
6 more questions in this section. Enroll free to practise them all.
Enroll free