0% found this document useful (0 votes)
1 views7 pages

Model 1 Online

The document contains a series of multiple-choice questions and answers related to computer science concepts, programming in Python, and flowchart symbols. Key topics include data storage types, programming syntax, and control structures in Python. The answers provided indicate correct responses to each question, highlighting fundamental knowledge in the field.

Uploaded by

adelkiro38
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views7 pages

Model 1 Online

The document contains a series of multiple-choice questions and answers related to computer science concepts, programming in Python, and flowchart symbols. Key topics include data storage types, programming syntax, and control structures in Python. The answers provided indicate correct responses to each question, highlighting fundamental knowledge in the field.

Uploaded by

adelkiro38
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Which of the following is not a medium for data storage (memory)?

A. Keyboard
B. Pen drive
C. Hard disk
D. DVD disk
ANSWER: A

What does ROM stand for?


A. Read Only Memory
B. Random Only Memory
C. Random Access Memory
D. Read & Write Memory
ANSWER: A

ALU is an abbreviation for


A. Arithmetic Logic unit
B. Arithmetic Low unit
C. Arithmetic Control unit
D. Arithmetic processing unit
ANSWER: A

The Central Processing Unit (CPU) performs the actual processing of data
A. True
B. False
ANSWER: A

RAM, it’s a primary storage


A. True
B. False
ANSWER: A

Any information stored in RAM is lost when the computer is turned off.
A. True
B. False
ANSWER: A

The smallest unit of data in computer is ________________


A. Byte
B. Nibble
C. Bit
D. KB

1
ANSWER: C

Which operator cannot be used to compare two values?


A. =
B. <
C. >=
D. ==
ANSWER: A
What is the output of the following code?
x = 15
x += 5
print(x)

A. 5
B. 15
C. 25
D. 20
ANSWER: D

What is the output of the following code?


x=3
y=2
print(x ** y)

A. 8
B. 9
C. 6
D. 3
ANSWER: B

Which of the following is NOT a valid Python comment?


A. ‘‘‘This is a comment’’’
B. “““This is a comment”””
C. # This is a comment
D. <!— This is a comment —>
ANSWER: D

What is the primary purpose of the if statement in Python?


A. To execute a block of code based on a condition
B. To perform mathematical operations
C. To repeat a block of code
D. To define a function
ANSWER: A

2
What will be the output of the following code?
x = 10
if x < 5:
print("x is greater than 5")

A. No output
B. x is less than 5
C. x is equal to 5
D. x is greater than 5
ANSWER: A

What does the expression not(10 == 10) evaluate to?

A. True
B. False
C. Error
D. Error plus
ANSWER: B

How do you start writing an if statement in Python? ________________


A. if x > y then:
B. if (x > y);
C. if x > y:
D. if (x > y)
ANSWER: C

What will be the output of the following code?


print(2 ** 0)
A. 1
B. 0
C. 2
D. 3
ANSWER: A

What does the following expression evaluate?


(3 + 2) * 4 / 2 ** 2
A. 5.0
B. 12.0
C. 10.0
D. 6.0
ANSWER: A

What does a rectangle represent in a flowchart?


A. Process
B. Decision
C. Start/End
D. Connector
ANSWER: A

3
What is the purpose of the diamond-shaped symbol in a flowchart?
A. Data Input/Output
B. Decision
C. Process
D. Connector
ANSWER: B

What is the data type of the variable x in the following code?


x = True
A. Integer
B. String
C. Float
D. Boolean
ANSWER: D

Which of the following is not a valid variable name in Python?


A. my_variable_1
B. 2nd_variable
C. variable25
D. Variable30
ANSWER: B

What is the result of the following expression in Python?


10 * (3 + 5) / 2
A. 40
B. 35
C. 20
D. 25
ANSWER: A

What is the value of the following expression?


print (True or (True and False))
A. True
B. False
ANSWER: A

How many decisions are in the flowchart shown?

A. 0
B. 1
C. 2
D. 3
ANSWER: C

4
What is a correct syntax to output "Hello World" in Python?
A. print("Hello World")
B. Prnt("Hello World")
C. print "Hello World"
D. print (Hello, World)
ANSWER: A

What will the following code output?


for i in range(3):
print(i, end=' ')
A. 0 1 2
B. 1 2 3
C. 0 1 2 3
D. 1 2 3 4
ANSWER: A

How do you start writing a for loop in Python?


A. for x in y:
B. for x >= y:
C. for x > y:
D. for x < y:
ANSWER: A

Which is the correct operator for power(x y)?


A. x^y
B. x**y
C. x^^y
D. x*y
Answer: B

Which one of these is floor division?


A. /

5
B. //
C. %
D. **
Answer: B

What is the output of this expression, 8/2**2?


A. 2
B. 8
C. 4
D. 1
Answer: A

The expression int(x) implies that the variable x is converted to an integer.


A. True
B. False
Answer: A

What will be the value of the following Python expression?


4+1%5
A. 4.5
B. 6
C. 4
D. 5
Answer: D

What will be the output of the following Python code?


print(type(5 / 2))

A. float
B. int
C. bool
D. str
Answer: A

What will be the output of the following Python code?


print(type(8 // 2))
A. float
B. int
C. bool
D. int and float
Answer: B

What will be the output of the following Python code?


Num1=13
Num2=13
value= Num1 == Num2
if value == True : print (1)
A. Error
B. True
C. 1
D. 13
Answer: C

What does the following expression evaluate to?


(4+2**2)/2+(4*3+6/1)

6
A. 19
B. 22
C. 17
D. 20
Answer: B

If the compiler finds any errors, it will continue processing and raise all the errors once it
finishes.
A. True
B. False
ANSWER: A

What is the output of the following Python code?

count = 0
while count < 3:
print("Hello")
count += 1
else:
print("Else block")
A. Prints "Hello" three times and then prints "Else block."
B. Prints "Hello" four times.
C. Prints "Else block" three times.
D. Raises a .SyntaxError
ANSWER: A

What will be the output of the following code?


x=5
if x > 0:
print("Positive")
else:
print("Negative")
A. Positive
B. Negative
C. Zero
D. Error
ANSWER: A

What is the output of the following code snippet?

x = 10
if x > 5:
print("Greater than 5")
elif x > 8:
print("Greater than 8")
else:
print("Less than or equal to 5")
A. Greater than 5
B. Greater than 8
C. Less than or equal to 5
D. No output
ANSWER: A

You might also like