(Solved):What do you see if you run the program and then press the ‘+’ key 22 times? a. A 10 sided polygon, b. A square, c. Nothing, d. A 9 sided polygon. View Answer…

 

Question

What do you see if you run the program and then press the ‘+’ key 22 times?

a. A 10 sided polygon,

b. A square,

c. Nothing,

d. A 9 sided polygon.

 

EXPERT ANSWER

This code basically draws a polygon. Each time we press ‘+’, we increase the number of sides of the polygon. However, there is a limit on the number of sides which is 10. Therefore, even after

Scroll to top