Question: 4. Create a loop (for/while) that draws squares that are 5 pixels wide and 5 pixels tall near the top of the screen, across

4. Create a loop (for/while) that draws squares that are 5 pixelswide and 5 pixels tall near the top of the screen, across

4. Create a loop (for/while) that draws squares that are 5 pixels wide and 5 pixels tall near the top of the screen, across the entire width of the screen. (6 marks) What would you change about your code if we only wanted the squares on the first half of the screen? 5. Create a loop (for/while) that draws circles that are 10 pixels wide and 10 pixels from the top left corner to the bottom right corner of the screen. (6 marks) What would you change about your code if we only wanted the circles to go from the top left corner to the middle of the screen (diagonally)? In-Class Assignment: While/For Loops 1. What is wrong with this code? Explain and fix the code! for (var s = 10; s

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!