πŸš€ Escape Room Hacks & Extensions

πŸ’Ž Master Level Challenges πŸ’Ž

Go beyond the escape room with advanced Random Value challenges!

πŸ“‹ Overview

Congratulations on completing the escape room! These hacks are designed to:

  1. Extend your learning with more advanced algorithms
  2. Apply concepts to real-world scenarios
  3. Create your own string manipulation challenges
  4. Explore optimization and algorithm design

🎯 Hack Categories:

  • πŸ”₯ Fire Hacks: Required challenges (choose 2/3)
  • πŸ’Ž Diamond Hacks: Advanced optional challenges
  • 🎨 Creative Hacks: Design your own problems

Hacks

πŸ”₯ Fire Hacks (choose 2/3)

Pseudocode Challenge Questions

  1. Write the description about Randomness in computing and the definition of RANDOM(a,b).

  2. Pseudocode Random Values practice, generate your own Pseudocode function and define the possible values generated, then give the specific proability of each value
    # For example, write a pseudocode function that will give you 7 for a chacne of 20 times when you run 100 times
    
  3. Pseudocode/Concept Practice, given RANDOM(3,7), what values can be produced?

  4. What is the probability of getting 4 from RANDOM(3,7)?

  5. If Random (4,4) is called, what is the output and its probability?

  6. If you run Random(3,7) 100 times, how many times would you expect to get a 6?

Python Version Questions

  1. Write the description of random_range(start, end)
    # Describe what this function does and its parameters
    
  2. Simulate rolling two dice and show all possible sum outcomes
    # Die faces: 1, 2, 3, 4, 5, 6
    # Write code to show all possible sums when rolling two dice
    
  3. Create a fortune teller where β€œTry Again” appears 40% of the time
    # Other responses: "Yes", "No", "Maybe"
    # Write code where "Try Again" has 40% probability
    
  4. If we run random.randint(1,10) 1000 times, about how many 3’s would we expect?

  5. What is the difference between random.randint(a,b) and random.choice(list)? Give an example of each.

  6. Write a Python code that rolls 2 dice and prints their sum.

JavaScript Version Questions

  1. Write the description of getRandomInRange(min, max)
    //Describe what this function does and its parameters
    
  2. Simulate drawing two cards from values 1-10 and show all possible total values
    // Card values: 1 through 10
    // Write code to show all possible totals when drawing two cards
    
  3. Create a decision maker where β€œDefinitely” appears 30% of the time
    // Other responses: "Probably", "Unlikely", "Never"
    // Write code where "Definitely" has 30% probability
    
  4. Write JavaScript code to simulate 10 coin flips, where 0 = Heads and 1 = Tails.

  5. What does this code output, and what is the range of the possible values?

JS

let num = Math.floor(Math.random() * 8) + 1;

console.log(num);


πŸ’Ž Diamond Hacks(optional)

Create a function that takes an object with decision options and their desired probabilities (as percentages), and returns a randomly selected decision based on those weights.


🎨 Creative Hacks

You can create your own question if you want and commit it to us if you want