Pseudocode Task

Hint: The pseudocode takes a shape name and size as input and draws the shape if it is a square or triangle.

PROGRAM chooseAndDrawShape
  INPUT choice (e.g., "square" or "triangle")
  INPUT size (e.g., 50 cm)
 
{/* Empty line in the pseudocode */}
  IF choice IS "square" THEN
    PEN DOWN
    SET color TO "blue"
    REPEAT 4 TIMES
      MOVE FORWARD size
      TURN LEFT 90 degrees
    END REPEAT
{/* END REPEAT is not a keyword in the list */}
    PEN UP
  ELSEIF choice IS "triangle" THEN
    PEN DOWN
    SET color TO "green"
    REPEAT 3 TIMES
      MOVE FORWARD size
      TURN LEFT 120 degrees
    END REPEAT
{/* END REPEAT is not a keyword in the list */}
    PEN UP
  ELSE
    DISPLAY "Unknown shape choice."
  ENDIF
END PROGRAM
{/* END PROGRAM is not a keyword in the list */}