1. What is the value of grades at line 7?
2. What is the value of grades at line 19?
3. What is the value of editfield1 after line 19 has executed?
4. Write code that changes the following integer values into a text string for display in an editfield..Dim I, J as integerI = 4J =105. Write code that adds the following two Editfields together.Dim num1, num2 as integerDim Answer as integerEditfield1.text = “2”Editfield2.text = “6”6. Write the values of I and J after the “if – then-else” statement is executed.Dim I as IntegerDim J as IntegerI = 10J = 2If (I + J) = 12 thenI= 5J = 5ElseI = 1J = 1End if7. What color will this oval be?canvas1.graphics.forecolor =RGB(256,0,0)canvas1.graphics.drawOval 100, 100, 50, 50canvas1.graphics.fillOval 100,100, 50, 50
8. List the four constructs that make up all computer programs.a. ____________________________b. _____________________________c. _____________________________d. ______________________________9. Draw an approximate picture of what the following line of code will look like when it has been drawn in REALbasic.Canvas1.graphics.drawline(50,50,50,100)10. Do the same for Canvas1.graphics. DrawOval(50,50,40,40)
11. Explain what each argument does in drawline. The arguments are the numbers that are between the parenthesis for example (50,50,40,40)12. Explain what each argument does in drawOval.
13. To move a ball along the top of a SpriteSurface or Canvas which axis would have to use x-axis or y-axis?
DrawOval(x,y,width, height)
14. Programmatically draw a ball at the left most top ot the Screen.
15. Draw the ball in the middle of the screen without using hard-coded numbers. The values of width and height are: width=40 and height= 40
16. Programmatically draw a tic tac toe board using only the numbers 0 and 3.
17. Explain how collisions work.
18. Name a debugging techniques that you have learned working on your house and bouncing ball project.
19. I want to move a ball across the screen 5 pixels each time through the loop how would I finish the code. BallX and BallY are integer properties initialized to 0,0. In addition you have an hspeed integer property set to 5, and a vspeed speed property set to 0;
for i = 1 to 100
DrawOval(BallX,BallY,40,40)
Next
20. You have a game where you need to increase a score by 1 each time the player's x position hits 50. You can assume score is an integer property that is initialized to 0.
score = 0
if (x- 5) then
fill in how to increase the score here
end if