Write a program to make BeeperBot draw a filled-in square, based on her initial
ID: 3663607 • Letter: W
Question
Write a program to make BeeperBot draw a filled-in square, based on her initial position and the number of beepers she is initially holding. The Southwest corner of the square should be just east of BeeperBot's initial position, and the height (and width) of the square is the number of beepers that BeeperBot is initially holding. After drawing the square, BeeperBot must end at the exact same position she started at, and then face east. Your program must work correctly for any initial position, any initial direction and any number (including zero) of initial beepers. For example, if BeeperBot starts at (1,3) and is holding 4 beepers, the following square should be drawn:
Explanation / Answer
Here's an example of a panel that will either make a 30px square in the middle, or resize with the panel. Perhaps it can give you enough to make progress.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.