ACTIVITY 36 / 50
Try as many times as you needTwo arguments
Let’s understand
A function can take several comma-separated parameters. Their order matters in a positional call. For a cost function, the device count can come before the cost per device. Clear names help explain the calculation.
Listen to the explanation
Example
def area(width, height):
return width * heightDefine total(count, cost) to return their product. Read two numbers and print total.
I need a hint
Return count * cost and pass two values when calling.
How to find an error
- Read the last line of the error message.
- Find the indicated line. Check quotes, parentheses and indentation.
- Change one thing and run again.
main.py
4 spaces
Your draft stays in this browser.
Result
PythonYour program’s output will appear here. Click Run.
Мой профиль