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

Your own command

Try as many times as you need

Let’s understand

def defines a function with a name. Indent its body. Defining it does not run it: call the function by name with parentheses. You can reuse the same command many times.

Listen to the explanation

Example

def hello():
    print("Hello")

hello()
YOUR MISSION

Define signal to print PING. Call it twice.

I need a hint

Put the calls signal() after the definition without indentation.

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.