Мой профиль
ACTIVITY 36 / 50

Two arguments

Try as many times as you need

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 * height
YOUR MISSION

Define 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
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.