Difference between revisions of "IB CS1 1st Quarter Exam"

From WLCS
(New page: 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...)
 
Line 11: Line 11:
  
 
16. 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)
 
16. 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 16 here
 
# Insert your answer to number 16 here
 
  
  
 
17. 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)
 
17. 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 17 here
 
# Insert your answer to number 17 here
 
  
  
Line 30: Line 26:
  
 
0 3 6 9 12 15 18 21
 
0 3 6 9 12 15 18 21
 
  
  

Revision as of 08:38, 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