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 : 1
Which programming language is often used for data analysis and machine learning?


Question No : 2
What is a loop in programming?

A bug in the code
A function that repeats a specific task
A variable that stores multiple values
A conditional statement

Question No : 3
What is the purpose of the elif statement in Python?

It is used to define a new variable.
It is used to handle exceptions.
It is used to execute code if the if condition is false.
It is used to test multiple conditions sequentially.

Question No : 4
What is a conditional operator in programming?

An operator that performs mathematical calculations
An operator that combines two values
An operator that evaluates a condition and returns one of two values based on the condition
An operator that compares two values for equality

Question No : 5
What does the acronym HTML stand for?

HyperText Markup Language
High-Level Text Language
Hyperlink Text Management Language
Home Tool Markup Language

Question No : 6
What is the purpose of the try and except blocks in Python?

To define a function
To create graphics
To handle exceptions and errors
To write comments in code

Question No : 7
What is the purpose of the if statement in programming?

To repeat a block of code
To define a function
To make decisions and execute code conditionally
To create a loop