🚀 Basics Day 3: Pre-Class Exercises 🚀

Pre-Class In-Class

Follow Along (Intro to Scope)

Follow along the examples in the Intro to Scope module.


Input:


Output:

Base: App Setup (Program Lifecycle and State)

Replace the code per the instructions in the Exercises (Base) section in the Program Lifecycle and State module.


Input:


Output:

Base: Last Roll (Program Lifecycle and State)

Create a version of the dice game that tells the user what their previous dice roll was.


Input:


Output:

Base: Win / Loss (Program Lifecycle and State)

As the user continues to play the game, tell them what their current win / loss percentage is.


Input:


Output:

More Comfortable: Most Rolled (Program Lifecycle and State)

Keep track of the number that's rolled the most times.


Input:


Output:

More Comfortable: Guessing (Program Lifecycle and State)

If the player guess is off-by-1 they win 1 point. If the player guess is exact they win 2 points.


Input:


Output:

More Comfortable: Advanced Guessing (Program Lifecycle and State)

The player guess can be off by up to 4. If the player guess is off-by-4 they win 1 point. Off-by-3, 2 points, off-by-2, 3 points, off-by-1, 4 points, exact, 5 points.


Input:


Output:

Follow Along (Program State for Game Modes)

Follow along the Blue / Green app in the Program State for Game Modes module.


Input:


Output:

Red Mode (Program State for Game Modes)

Add a Red mode to the game.


Input:


Output: