STEP 2: So far our rectangles look exactly alike! We'll customize them using arguments.

Arguments are the information in parentheses that tell the program how to complete a command.

  • Change the arguments of the start rectangle to look like this: (0, -250, 500, 50, "red")
  • Change the arguments of the finish rectangle to look like this: (0, 250, 500, 50, "green")
  • Click Run to see how the rectangles have changed! We've changed their position, dimensions, and color!

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

# sprite = codesters.Rectangle(x, y, width, height, "color") start = codesters.Rectangle(0, 0, 100, 50, "blue") # sprite = codesters.Rectangle(x, y, width, height, "color") finish = codesters.Rectangle(0, 0, 100, 50, "blue")
  • Run Code
  • Enviar Trabajo
  • Actividad Siguiente
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)