PYTHON CORE · LESSON 20
Function with response
Argument and return · about 15 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Reprint the function. Don't forget to back off before return.
def triple(number):
return number * 3
print(triple(4))Open the editor for class workSolve it yourself
Create add_two with the number argument. Let it return number plus 2. Call it with the number 5 and output the answer.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework