Computer Science

Computer Science

Python MCQs Strings

Q1. Which data type is used to store text in Python? A) char B) string C) str D) text Show Answer ✅ Correct Answer: (C) str 📘 Explanation: Python uses the str data type to store text. Q2. Which of the following is the correct way to create a string? A) ‘Hello’ B) Hello C)

Computer Science

Python MCQs Control Statements (if, loops)

Q1. Which keyword is used for conditional execution in Python? A) switch B) if C) when D) select Show Answer ✅ Correct Answer: (B) if 📘 Explanation: if is used to test a condition and execute code accordingly. Q2. Which statement is used when an if condition is false? A) else B) elseif C) when

Computer Science

Python MCQs Operators

Q1. Which operator is used for addition in Python? A) * B) + C) – D) / Show Answer ✅ Correct Answer: (B) + 📘 Explanation: The + operator is used to add two values. Q2. Which operator is used to find the remainder of a division? A) / B) // C) % D) **

Computer Science

Python MCQs Data Types

Q1. Which of the following is a built-in data type in Python? A) real B) float C) double D) character Show Answer ✅ Correct Answer: (B) float 📘 Explanation: float is a built-in Python data type used to store decimal values. Q2. Which data type is used to store whole numbers in Python? A) float

Computer Science

Python MCQs Algorithm, Flowchart, Pseudocode

Q1. What is an algorithm? A) A programming language B) A flowchart C) A step-by-step procedure to solve a problem D) A software Show Answer ✅ Correct Answer: (C) A step-by-step procedure to solve a problem 📘 Explanation: An algorithm is a finite, ordered set of steps used to solve a specific problem. Q2. Which

Computer Science

Python MCQs Variables

Q1. What is a variable in Python? A) A keyword B) A data type C) A memory location used to store a value D) A function Show Answer ✅ Correct Answer: (C) A memory location used to store a value 📘 Explanation: A variable stores data values in memory and can change during program execution.

Computer Science

Python MCQ Basics

Q1. Who developed the Python programming language? A) James Gosling B) Dennis Ritchie C) Guido van Rossum D) Bjarne Stroustrup Show Answer ✅ Correct Answer: (C) Guido van Rossum 📘 Explanation: Python was created by Guido van Rossum in the late 1980s while working at CWI, Netherlands. Q2. In which year was Python first released?

Scroll to Top