QuestionPaper-7-MsSAnum (1)
QuestionPaper-7-MsSAnum (1)
INSTRUCTIONS
Answer all questions.
Use a black or dark blue pen.
Write your answer to each question in the space provided.
Do not use an erasable pen or correction fluid.
The number of marks for each question or part question is shown in brackets [ ].
_____________________________________________________________________________
a) 123Name
b) first_name
c) name@123
d) first-name
III. What type of error occurs if a required colon (:) is missing in Python?
a) Logical error
b) Runtime error
c) Syntax error
d) Indentation error
Question 2: Write (True) for statement is correct. Also write the correct statements for the
false ones. [__/5]
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Answer: _________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Answer: _________________________
_______________________________________________________________________
_______________________________________________________________________
Question 3: The table contains 03 terms. Complete the table with the descriptions.
[__/3]
No Term Description
4
.
I.
Programming
II.
Syntax
III.
Operators
Question 5: State any four rules for naming variables in programming. [__/2]
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
_____________________________________________________________________________
Answer:
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
5
_______________________________________________________________________
_______________________________________________________________________
Question 7: Compare and output the following two pieces of code: [__/2]
I. Code 1:
value = (5 * 2) + 4.5
print("Calculated value:")
print(value)
II. Code 2:
value = (5 * 2) + 4.5
print("Calculated value:", value)
Answer:
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
Question 8: Identify and correct the error in the following code: [__/2]
num1 = 10
num2 = 5
result = Num1 - num2
print("The result is: result)
Answer:
Th____________________________________________________________________
_______________________________________________________________________
6
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________
_______________________________________________________________________