Drop hier links of afbeeldingen om ze aan de editor toe te voegen.

In a make task you use the skills you have learned to create a program from scratch. This time there is an extra constraint. The editor starts you off with the two print statements, so you only have to add the delay between them.

Your task

There is a way to add a time delay into Python code. Do some research and write a program that outputs the joke below, waits a moment with sleep, and only then outputs the punchline. Keep the delay short, a second or two, so that your program still finishes quickly.

Use this joke, so that the output can be checked automatically:

Why do programmers prefer dark mode?
Because light attracts bugs!

The tests also check your code: a program that does not use sleep to add the delay does not pass, so the starter code alone is not enough.

You will only see the pause if you run the program yourself in the sandbox, using the To sandbox button at the bottom of the editor. The automated tests run your program from start to finish and only look at the finished output, so the test feedback will not show any pause.

Help! My code doesn't work!

Make sure that you check for the following things:

  • print does not have any capital letters.
  • The string text is surrounded with speech marks " ".
  • The string (including the speech marks) is surrounded by brackets ( ).