Whitespace and comments are important for programmers. Imagine a programmer having to wake up in the middle of the night to fix a program error for a business. The last thing the programmer is going to want to do at that hour is to have to read through messy code without whitespace and comments. It goes without saying that although programs will run, omitting whitespace and comments is just senseless....especially with longer programs!
Take a look at the code below. Someone has removed all the whitespace and comments. For this assignment, we would like for you to add it back. You may complete this task several ways. You may choose to load the program in either Replit or CodeHS..
Replit Link: Fix My Code
CodeHS Link: Fix My Code
...or, if you would prefer to load the code into a different IDE, you may copy a variation of it from below:
public void setup(){size(300, 300);background(255);fill(0,255,0); rect(130,140,50,50);fill(255,0,0); triangle(130,140,150,120,180,140);}public void draw() { }
Once you have added in the appropriate amount of comments and whitespace, follow your teacher's directions to submit this assignment.
Fix My Code Rubric - 5 Points