5 It’s just a prank, bro!

 

This could be made into a jump scare, the quiz button triggers a scary sound and then a picture appears, or a happy birthday prank, plays happy birthday?

This chapter covers

  • Selecting a random item from a list
  • Call another function within a function.
  • How to use pop-ups
  • Respond differently to user actions.

Rick Astley is a famous English singer who has a popular song called “Never Gonna Give You Up.” In May 2007, during an online chat, a user uploaded and shared the song to troll the other users. This began a trend of people sending a file to other people pretending it was something else, when actually, it was the song, “Never Gonna Give You Up.”

For example, you receive a message along the lines of “open this photo of your brother falling over.” When you open the file it plays the song. This prank is known as being Rickrolled, or Rickrolling. Rick has said that even he has been Rickrolled by his own song. He was sent an email from someone claiming to have met him backstage at a concert when they were 12. However, the prankster posted a link to the song instead of a picture of the meeting.

If you want to learn more about the prank, click here: https://www.youtube.com/watch?v=dQw4w9WgXcQ.

Figure 5.1 A prank quiz that Rickrolls the player;
A picture containing diagram Description automatically generated

WHAT YOU WILL BUILD

Creating the project

Downloading the Audio and Image File

Importing the modules

Choosing a random color

Creating the two main functions

Creating the prank again function

Building the main app

Creating the two answer buttons

Testing the program

Other things to try.

Changing the question and the answer buttons

Statements of fact

Using Simple Audio

sitemap