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 does the partial function do?
Think about how functions can be modified.
Give an example of using partial.
Remember the power function.
What does the partial function do?
Consider how function arguments can change.
True or False: Using partial, we can create functions that require fewer parameters to be passed.
Think of how we simplify function calls.
Create a partial function that calculates the area of a rectangle, fixing one dimension at, say, 10. Show how you would call it with different widths.
Think about the rectangle area formula.
Use partial to create a custom text formatter that will always prepend 'Hello, ' to any provided name string. Demonstrate how this would work.
Congratulate yourself on making text special!
4 more questions in this section. Enroll free to practise them all.
Enroll free