5 It’s just a prank, bro!

 

This chapter covers

  • Selecting a random item from a list
  • Calling another function within a function.
  • How to use pop-ups
  • Responding 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, looks like a simple quiz, but it Rickrolls the player.

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 ricked_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

Summary

Using Simple Audio

sitemap