Skip to content

Latest commit

 

History

History
15 lines (8 loc) · 605 Bytes

do_now_25.md

File metadata and controls

15 lines (8 loc) · 605 Bytes

Variables practice

In your notebook

  1. Write an algorithm, in English, for how you would swap the values in two variables. For example, suppose we have two variables that have different values:

    • set playerOneValue to "Torch"

    • set playerTwoValue to "Gold"

  2. How would you swap the values so playerOneValue is set to "Gold" and playerTwoValue is set to "Torch"?

    • Here, "Torch" and "Gold" are just examples. Suppose the algorithm doesn't know what values the variables have before it begins.
  3. Swap your algorithm with a partner and test it to determine if it works or not.