On completion of this lab you should:
Create a new Sketchbook in your PDE and save it as lab04_step01.
Enter the following code:
Update the code by changing int to Int (uppercase I). Run your code again. What happened? Can you explain what happened? Ask your teacher to explain it if you are not sure.
Change Int back to int.
Update the code by changing the amount assigned to variable a from 70 to 70.56. Run your code again. What happened? Can you explain what happened? Ask your teacher to explain it if you are not sure.
Change 70.56 back to 70.
Save and close the sketchbook.
Create a new Sketchbook in your PDE and save it as lab04_step02.
Enter the following code:
Update the code by changing the amount assigned to the xCoordinate variable from 50.67 to just 50.
Run the code. Why did it work? Can you explain what happened? Ask your teacher to explain it if you are not sure.
Change the amount assigned to the xCoordinate variable back to 50.67.
Update the code by renaming the yCoordinate variable name to xCoordinate. Run your code again. What happened? Can you explain what happened? Ask your teacher to explain it if you are not sure.
Change the code back.
Save and close the sketchbook.
The exercises are typically based on the material we covered in the previous steps in this lab.
For each exercise listed below, open a new sketchbook.
NOTE: the object of this exercise is to use the appropriate arithmetic operators e.g.
on the variables (a,b,c).
The rules for drawing this image are as follows:
The solutions for this lab can be found here.
The file is in Zip format, so when you download it, you will need to unzip it. If you don't have unzipping software installed on your computer, 7Zip is a good choice.