Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the purpose of a parameter in a function?
Remember how we pass values to functions.
Define a simple function multiply that takes two parameters and returns their product.
Think about how to use the return keyword in functions.
What does a parameter do in a function?
Think about how you provide values when calling a function.
True or False: You can have multiple parameters in a single function.
Consider examples where functions take more than one value.
Create a function convert_temperature that converts Celsius to Fahrenheit and accepts a temperature in Celsius as a parameter.
Recall the formula for converting temperatures.
Write a function total_sales that requires both a list of sales figures and a tax rate to calculate total sales including tax.
Look at how we can apply the sum and multiply tax!
5 more questions in this section. Enroll free to practise them all.
Enroll free