You are on page 1of 4

Question 1: 

In programming terminology, numbers are called numeric……

A. literals
B. expressions
C. operations
D. all of the above
E. none of the above

Question 2: A combination of numbers, arithmetic operators and parentheses that can be
evaluated is called a numeric………

A. expression
B. operations
C. literal
D. all of the above
E. none of the above

Question 3: The names given to values stored in memory in Python are called…….

A. variables
B. quantities
C. statements
D. literals

Question 4: A statement of the form variableName = numericExpression is called a/an……

A. assignment statement
B. arithmetic statement
C. expression
D. mathermatic operation

Question 5: In Python, variable names may begin with……...

A. a letter
B. an underscore
C. both A and B
D. none of the above

Question 6: In Python, variable names may consist of……….

A. letters
B. digits
C. underscores
D. all of the above
E. none of the above
Question 7: If the value of n is 3.14159, the function round(n) will return………

A. 3
B. 3.1
C. A syntax error
D. A logic error

Question 8: Integer division is accomplished using the ………… operator.

A. //
B. %
C. /
D. /=

Question 9: The remainder of an integer division is accomplished using the ………. operator.

A. %
B. //
C. mod
D. rem

Question 10: The statement a /= 5 is an example of a/an ………..

A. Augmented assignment
B. Syntax error
C. Logic error
D. Integer division

Question 11: In the following numeric expression, what is evaluated first?

4*a + 7/(x-y) + (n**3)

A. (x-y)
B. (n**3)
C. 4*a
D. a+7

Question 12: Grammatical and punctuation errors are called ……..

A. Syntax errors
B. Logic errors
C. Runtime errors
D. Bugs
Question 13: A syntax error is caught

A. By the interpreter
B. During runtime when the program crashes
C. During runtime when an unexpected results is given
D. All of the above

Question 14: An example of a runtime error is ………

A. A misspelled function name


B. An undeclared variable
C. Division by zero
D. All of the above

Question 15: When Python removes an orphaned object from memory, it is called ……

A. Garbage collection
B. Memory sweeping
C. Variable abandoning
D. Redirection

Question 16: What will the following line of Python display?

print (round(22.5))

A. 22
B. 23
C. 22.5
D. This is a logic error

Question 17. Which variable name is invalid?

A. X-ray
B. XRaY
C. X_R_A_Y
D. Xray256

Question 18: In Python, string literals are surrounded by

A. Single quotes
B. Double quotes
C. Either A or B
D. None of the above
Question 19: A sequence of consecutive characters from a string is called a/an ………

A. slice
B. run
C. group
D. cut

Question 20: In the string literal "Life, the universe and everything". The substring 'verse' begins


at position ……. and ends at position ……..

A. 13, 17
B. 12, 17
C. 13, 18
D. 12, 18

You might also like