Anne Dawson: CSCI110A_Q1.htm
Last Updated: Sunday
17th July 2005, 12:19 PT by AHD
This document is subject to change without
notice.
Please report any errors or omissions in
this document:
adawson@coquitlamcollege.com
See Course Schedule for date of Quiz 1
Quiz 1 tests your knowledge of the
topics covered in the first 5 weeks of this course
- but does NOT include the topic
of the class of week 6
i.e Decisions 2
is not on Quiz 1.
Quiz 1 will be composed of a mix of
questions:
Part 1 of the quiz is made up of
40 multiple choice or true/false
questions.
Each question is worth 1 point.
10 short answer questions.
Each question is worth 1 point.
Part 3 of the quiz is composed of
10 predict-the-output questions.
Each question is worth 2 points.
The duration of Quiz 1 is 90 minutes.
The following two questions are examples of
the type of question
you may expect for Quiz 1.
1) What will be displayed after clicking the button?
Assume txtHours.Text contains "10"
Private Sub cmdButton_click()
Dim Salary As Single
Salary = Pay(Val(txtHours.Text))
picOutput.Print "Pay is : $"; Salary;
End Sub
Private Function Pay(hours As Single)
Dim rate_per_hour As Single
rate_per_hour = 20
picOutput.Print "hourly rate : $";
rate_per_hour; "
";
picOutput.Print "hours :"; hours;
" ";
Pay = hours * rate_per_hour
End Function
a)
Pay is: $400
b)
hourly rate: $20
hours : 10 Pay
is: $200
c)
Pay is: $200
d)
hourly rate: $20
hours : 10
Pay is: $200
Answer b
2)
Determine whether the following condition is true or false. Assume a = 2 and b = 3.
Not (a < b) Or (Not ( a < (b - a)))
a)
True
b)
False
Answer: a
Good
Luck!