Coding a Game of Two Truths & A Lie

0
Coding a Game of Two Truths & A Lie
Tweet about this on TwitterShare on FacebookPin on PinterestShare on LinkedInShare on Google+Share on TumblrEmail this to someoneShare on StumbleUponShare on RedditDigg this

Hello world!

Welcome back to another school year! In this activity we are going to code an app for students to play “2 Truths and a Lie.” In the game, the programmer populates a list (array) containing three “facts” but one of the fact will be false. In my example, I use the second fact as my false statement.

The user of the game will select 1, 2 or 3 on the keyboard to guess which statements are true and which are false. In my example, if the user enters 1 or 3, the game returns “Nope that is true!” If the user enters #2, which is my false statement, the game says “Correct!”




Here is the tutorial video. Feel free to share this with students!

 

Here is a sample of my game:

Here is the project page: https://scratch.mit.edu/projects/244756045/

Possible Extensions:

This game could be extended using Makey Makey. Students can build circuits connected to objects on their desk. Rather than using the keyboard (1, 2 or 3), users can program “up, left, or down” on Makey Makey to be the corresponding inputs. Use Play D’oh, use bananas or use pie plates as inputs! If you teach electricity or circuits, this is the perfect extension!

For more lessons, activities and ideas, grab a copy of my book, Code Breaker, on Amazon here!

 

(Visited 433 times, 1 visits today)

Leave a Reply

Name
Name*
Email
Email *
Website
Website