STEP 6: In order to catch food, the fish need to be able to swim!

  • Click and drag Right Key into the bottom of your program.
  • Place your mouse in the code editor at the end of the very last line of code and press enter on your keyboard.
  • Then drag out Left Key. Make sure to place it at the very bottom of the code editor.
  • Click Run and and use the arrow keys on your keyboard to make the fish swim left or right!

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

stage.set_background("underwater") sprite = codesters.Sprite("fish") sprite.go_to(-100, -220) stage.disable_floor() stage.set_gravity(4) sprite.set_gravity_off()
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)