Difference between revisions of "IB CS1 1st Quarter Exam"
From WLCS
Line 10: | Line 10: | ||
− | + | 17. Write an if statement that will check if a variable x is divisible by 18. If it is divisible by 18, then print a message that says x “is divisible by 18” and if it is not, then print out a message that says that it is not. (3 marks) | |
− | # Insert your answer to number | + | # Insert your answer to number 17 here |
− | + | 18. Write the function definition for a function named rectangleArea(height, width) that takes two parameters: height and width. The function should return the area of the rectangle. (4 marks) | |
− | # Insert your answer to number | + | # Insert your answer to number 18 here |
− | + | 19. Write the while loop that prints out the following sequence of numbers: (6 marks) | |
Line 28: | Line 28: | ||
− | # Insert your answer to number | + | # Insert your answer to number 19 here |
--> | --> |
Revision as of 08:49, 30 October 2008
Directions: There are 3 parts to the exam.
- Part I: Closed-book scantron - Do NOT write on the exam, only write on the scantron
- Part II: Closed-book paper - You will write on this part
- Part III: Open-book - answer the following questions on the computer and print out your answers