riddle.jpg




Goal: Create a joke telling app



1. Create a project named

with your first initial and last name and "Riddle" (VAllanRiddle, in my case).

Create three buttons. Feel free to customize your buttons however you want.

**Be sure to rename your buttons.
A) One to tell the joke.
B) One to give the punchline.
C) One to play a laugh track.

2. Add a TextToSpeech component to the screen.

A) This is an invisible components, but you will use the TextToSpeech blocks when adding functionality to your buttons.

3. Add a Player to the screen.

A) Attach a laugh track audio file to the player.
***To download the audio file, right click the above laugh track link and save audio file to download it.

4. Use a when.Click block for each button.

A) For the joke and punchline you will want to use a call.Speak block to have your App read your joke and deliver the punchline upon pushing the buttons.
B) For your laugh track you’ll want your App to start the laugh track when the button is clicked. You will use a block in the Player component for this.
***You could also use the AccelerometerSensor to play the laugh track when the phone is shaken.


Challenges

1. () For a joke that has two possible answers, randomly pick which answer you use.**

2. (***) Try adding a list of jokes and a list of punchlines that are randomly selected when the user clicks the button.