STEP 4: Our game gives the user a different amount of points depending on what sprite the user clicks on.

A dictionary is a special type of list that allows us to connect a key to a value.

A key is like a word in a real-life dictionary, and a value is like its definition.

  • In LOGIC, click on and drag in Dictionary with String Keys inside main().
  • Change "cat" to "alien1", "snake" to "alien2", and "bird" to "ufo". These are our keys.

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)