Practice B2.1 Programming fundamentals with authentic IB Computer Science (First Exam 2027) exam questions for both SL and HL students. This question bank mirrors Paper 1, 2, 3 structure, covering key topics like programming concepts, algorithms, and data structures. Get instant solutions, detailed explanations, and build exam confidence with questions in the style of IB examiners.
Define what is meant by "syntax" in programming.
Distinguish between syntax errors and logic errors, providing an example of each.
Define the term "identifier" in programming.
List four rules that typically apply when naming identifiers in most programming languages.
Evaluate the following identifier names and explain which ones are valid and which are invalid: student_name 2ndPlace final-grade MAX_VALUE
Define the term "variable" in programming.
Explain the difference between a constant and a variable, giving one example of each.
State what is meant by "debugging" in programming.
Describe three common debugging techniques that programmers use to find and fix errors.
Define what is meant by "type conversion" in programming.
Distinguish between implicit (automatic) and explicit (manual) type conversion, providing examples of each.
State two primitive data types commonly used in programming languages.
Describe the difference between integer and floating-point data types, including their typical uses.
State what is meant by "assignment" in programming.
Explain the difference between assignment (=) and equality comparison (==) operators, providing examples.
State two methods of providing input to a program.
Describe the purpose of input validation and explain why it is important in programming.
Define the term "operator precedence" in programming.
Explain why operator precedence is important, giving an example where it affects the result of a calculation.
Evaluate the following expression without using parentheses and show the order of operations: result = 5 + 3 * 2 - 8 / 4 Calculate the final value of result.
State what is meant by "scope" in programming.
Explain the difference between local and global variables, including their advantages and disadvantages.