Skip to content

Commit

Permalink
function warmup update
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmaxwellhyland committed Jan 30, 2024
1 parent 707c61b commit 30518f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 21 deletions.
Binary file removed Callbacks/Assets/FunctionMachineWin.png
Binary file not shown.
8 changes: 3 additions & 5 deletions Callbacks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ Students will be able to...
- Understand that functions are objects in JavaScript
- Use `setInterval` and `addEventListener`

## Warm-Up: Function Machine
Introduce the warm-up game by following the [instructions](WarmUp.md). Students will visit the [Function Machine](https://www.mathplayground.com/functionmachine.html) site, read through the instructions, and play the game. The first student to correctly figure out the answer for an Advanced Game, Activity Level 3, can win something. It should look something like this:
## Warm-Up: Function Game
Introduce the warm-up game by following the [instructions](WarmUp.md). Students will visit the [Function Game](https://embed.mangahigh.com/bubblefunction?locale=en-us&guestMode=false) site, read through the instructions, and play the game. The student who succeeds the most can win something.

![](Assets/FunctionMachineWin.png)

It may be worth walking through an example with the group just to show everyone how it works. There are also some additional games linked from the instructions - students are welcome to play those as well.
It may be worth walking through an example with the group just to show everyone how it works.

## Lecture: Functions & Callbacks
The [presentation](FunctionsAndCallbacks.pptx) reviews functions, and shows how they can be used for callbacks. There are a few code examples.
Expand Down
19 changes: 3 additions & 16 deletions Callbacks/WarmUp.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
# Warm-Up: Function Machine
In JavaScript, [functions](https://javascript.info/function-basics) are a way to run a piece of code on-demand. Parameters are used as function input, and returns are used to give back an output. In math, the concept of functions is similar - often, math functions take some sort of input, and produce an output. In this warm-up, play a math-inspired function game to practice using input and output.

## Function Machine
[Click here to access the Function Machine game.](https://www.mathplayground.com/functionmachine.html)
## Function Game
[Click here to play the Function game.](https://embed.mangahigh.com/bubblefunction?locale=en-us&guestMode=false)

The goal is to figure out the "code" for a math function based on its input and output.

- Start with the **Beginner** mode, then move onto the **Advanced**
- Click **Instructions** in the upper right to see some detailed instructions
- Choose a difficulty with the numbers in the **Choose an Activity Level** box at the bottom
- Try to figure out the **Advanced Level 3** - that's the hardest one!

## Additional Games
There are some additional math/code games that are not directly related to the concept of functions, but feel free to try them out:

- [Follow the Code](https://www.mathplayground.com/follow_the_code.html)
- [Equation Creations - Drawing with Math](https://www.mathplayground.com/equation_creations.html)
- [Candy Challenge - Algebra](https://www.mathplayground.com/candy_challenge_game.html)
- [Slyers](https://www.mathplayground.com/logic_slydrs.html)
The goal is to use the proper function to match the input bubbles to the bubbles on the field already. Good luck!

0 comments on commit 30518f6

Please sign in to comment.