Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is the purpose of a function in Python?
Think about code efficiency.
Write a simple function that prints 'Hello, World!'
Remember to use the 'def' keyword.
What keyword is used to define a function in Python?
Think of the beginning of a function's definition.
True or False: Functions can accept parameters.
Think about how we pass data into functions.
Create a function that accepts an arbitrary number of student names and returns a formatted string of all names separated by commas.
Use join function to concatenate strings.
Write a function that accepts both a required integer parameter and a default float parameter. The function should return their product.
Remember to set the default value for the float parameter!
7 more questions in this section. Enroll free to practise them all.
Enroll free