Home

Computer Science Principles MCQ Question with Answer

Computer Science Principles MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download Computer Science Principles MCQ Question Answer PDF

Question No : 15
Which of the following is not a valid programming construct in Python?

for loop
if statement
switch statement
while loop

Question No : 16
Which of the following is not a valid programming construct in Python?

if-else statement
switch statement
while loop
for loop

Question No : 17
What is the purpose of the for loop in programming?

To execute a block of code a specific number of times
To make decisions and execute code conditionally
To define a function
To create graphics

Question No : 18
What is the purpose of the finally block in a try-except-finally construct in Python?

To define a function
To execute code regardless of whether an exception occurred
To create graphics
To repeat a block of code

Question No : 19
What is the purpose of a while loop in programming?

To define a function
To create graphics
To execute a block of code a specific number of times
To repeat a block of code while a condition is true

Question No : 20
What does the term protocol mean in the context of computer networking?

A set of rules and conventions for communication between devices
A type of hardware
A programming language
A software application

Question No : 21
What does the term bit stand for?

Binary Text
Binary Information Transfer
Binary Digit
Byte Interval Time