Parameter or argument?
In this function definition, what is the name `name` called?
Start activityTopics / Functions
Parameters, return values, and the difference between printing and returning.
Generated helpers often print when the caller needed a value, or ignore an edge case in the contract. Students need to read the function as a specification, not as a block of syntax.
In this function definition, what is the name `name` called?
Start activityIn your own words, what is a function, and why do programmers use them? Say what it is, not how to write …
Start activityMatch each term to the definition that fits it. The code is there so you can see what each term refers to; …
Start activityWhat is printed when this program runs?
Start activityExplain in plain English what the function does and how the program uses it. Say what goes in, what comes out, and …
Start activityDo not write the Python. Write a short specification (the kind of prompt you would give a colleague or a model) that …
Start activityThe programmer expected this program to print only 'Average is 6.0'. Instead it prints 6.0 on one line and 'Average is None' …
Start activityAn AI generated this code to show prices with 20% tax. It works but repeats itself. Improve it by removing the duplication, …
Start activityA student asked an AI to complete is_even so that it returns True when n is even. The AI suggested the highlighted …
Start activity