STEP 2: Let's do some Python math to calculate the area of the rectangle!

In Python, we use an asterisk * for multiplication.

Remember, an integer is any whole number.

  • Change the value of rect_area from 25 to the equation 25 * 50 (the width and height of my_rect!).
  • Notice: this is exactly the same as saying area = width x height, like you would in math class.

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)