Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IT_Quiz # 2_Computer Programming1

Total questions: 32

Worksheet time: 24mins

Name
Class
Date
1.
Lastname, Firstname, MI
4 lines
2.
Course/Year/ Section
a)
BSIS 1A
b)
BSIS 1B
c)
BSI/T 1F
3.
Suppose p is 7, q is 3, s is 1. Find the truth value of (s != p) and (q == s)
a)
TRUE
b)
FALSE
4.
Suppose p is -2, q is 3, s is 5. And x = (p + q) , y = (q * s) Find the truth value of x <= y.
a)
TRUE
b)
FALSE
5.
Suppose p is 1, q is -1, s is 0. And x = (q + p) , y = (s ** p) Find the truth value of x != y.
a)
TRUE
b)
FALSE
6.
Variable names in Python can contain spaces
a)
TRUE
b)
FALSE
7.
Suppose p is 10, q is 2, s is 4 and r is 5. And x = (p / r) , y = (s * q) Find the truth value of x > y.
a)

TRUE

b)

FALSE

8.
Variable names in Python can start with a number.
a)
TRUE
b)
FALSE
9.
Variable names in Python are case-insensitive.
a)
TRUE
b)
FALSE
10.
Variable names in Python can be of any length.
a)
TRUE
b)
FALSE
11.
You can use special characters like !, @, and # in variable names in Python.
a)
TRUE
b)
FALSE
12.
Python allows you to use emojis in variable names
a)
TRUE
b)
FALSE
13.
You should avoid using single-letter variable names in Python because they are not descriptive.
a)
TRUE
b)
FALSE
14.
Underscores are allowed in variable names in Python.
a)
TRUE
b)
FALSE
15.
Variable names in Python are limited to 10 characters.
a)
TRUE
b)
FALSE
16.
Using the same variable name in different parts of your code can lead to bugs
a)
TRUE
b)
FALSE
17.
Python automatically converts variable names to lowercase.
a)
TRUE
b)
FALSE
18.
The "!=" operator is used to check if two variables have different values in Python
a)
TRUE
b)
FALSE
19.
The "or" operator is used to perform logical AND in Python
a)
TRUE
b)
FALSE
20.
The "not" operator is used to negate a boolean expression in Python
a)
TRUE
b)
FALSE
21.
Python has a list of reserved keywords that cannot be used as variable names.
a)
TRUE
b)
FALSE
22.
It's a good practice to use camel case when naming variables in Python.
a)
TRUE
b)
FALSE
23.
I. Variables can’t reassign anytime. II. Variable type is specified
a)
a. Both statement are correct
b)
b. First statement is correct, the other is wrong
c)
c. Both statement are wrong
d)
d. First statement is wrong, the other is correct
24.
I. String is wriiten as str with format specifier %s II. Integer is written as int with format specifier as %f
a)
a. Both statement are correct
b)
b. First statement is correct, the other one is wrong.
c)
c. Both statement are wrong
d)
d. First statement is wrong, the other is correct
25.
Which of the following characters is allowed in Python variable names?
a)
a. @
b)
b. #
c)
c. $
d)
d. All of the above
26.
Which of the following is not a good variable name in Python?
a)
a. my_variable
b)
b. myVariable
c)
c. MyVariable
d)
d. my variable
27.
Which of the following is a valid Python constant variable name?
a)
a. MY_CONSTANT
b)
b. myConstant
c)
c. my_constant
d)
d. 1MY_CONSTANT
28.
What is the maximum length of a Python variable name?
a)
a. 64 characters
b)
b. 128 characters
c)
c. No maximum length
d)
d. 256 characters
29.
Which of the following is not a good reason to use meaningful variable names in Python?
a)
a. It makes your code more readable
b)
b. It helps you remember what your code does
c)
c. It makes your code run faster
d)
d. It makes your code easier to maintain
30.
Which of the following is the operator for the modulo operation in Python?
a)
a. %
b)
b. *
c)
c. /
d)
d. //
31.
Which of the following operators can be used to check if two variables have the same value in Python?
a)
a. =
b)
b. ==
c)
c. !=
d)
d. <=
32.
Which of the following is the operator for floor division in Python?
a)
a. %
b)
b. *
c)
c. /
d)
d. //