Skip to content

b. Test Your Knowledge

Activity A - Multiple-Choice Review (1 mark each)

(Recall-style, Section A format)

1. Which data type is most appropriate for storing whether a student has submitted a task?

A. String

B. Boolean

C. Floating point

D. Character

Answer

B. Boolean


2. What does it mean to initialise a variable?

A. Compare it with another variable

B. Give it its first value

C. Print it to the screen

D. Delete it from memory

Answer

B. Give it its first value


3. Which operator is used to find the remainder after division?

A. /

B. *

C. %

D. ==

Answer

C. %


4. Which expression uses a logical operator?

A. totalPrice + gst

B. score >= 50

C. isMember && hasPaid

D. quantity % 2

Answer

C. isMember && hasPaid


5. Which data type is usually best for storing a whole-number year level?

A. Integer

B. String

C. Character

D. Boolean

Answer

A. Integer


Activity B - Short Answer Practice (2-4 marks each)

(Section B format - active recall)

1. Explain why choosing an appropriate data type matters in programming.


2. Distinguish between initialising a variable and accessing a variable.


3. Explain one difference between a logical operator and a conditional operator.


4. Identify a suitable data type for each of the following:

  • student first name
  • average test score
  • whether permission has been returned

5. Explain why storing a number as text can create problems in a program.


6. Describe one common mistake involving = and ==.


Activity C - Scenario Application (3-6 marks each)

(Section C style - applied retrieval)

Scenario 1 - Canteen total calculator

A student is planning a program that stores:

  • the lunch item name
  • the quantity ordered
  • the price of one item
  • whether the student is eligible for a discount

Tasks:

  1. Select an appropriate data type for each item.
  2. Explain one arithmetic operator the program would need.
  3. Explain one conditional operator the program would need.

Scenario 2 - Score validator

A program checks whether a score is valid using this condition:

score >= 0 && score <= 100

Tasks:

  1. Identify the conditional operators used.
  2. Identify the logical operator used.
  3. Explain what the full expression is testing.

Activity D - Extended Response (6-8 marks)

(Analytical / evaluation task)

Prompt:

Discuss why data types, variables and operators are the foundation of programming.

In your response, refer to:

  • at least two different data types
  • how variables store and update data
  • how operators help programs process information and make decisions