NEW
Font size
WorksheetsAlgorithmization and Programming Quiz
Total questions: 71
Worksheet time: 12mins
Which operator is used for conditional branching in C++ ?
goto
if
continue
break
What type of loop repeats a block of code while a condition is true ?
for loop
do-while loop
while loop
switch
Which data type is used to store a sequence of characters in C++ ?
int
float
char
string
What is an algorithm ?
A description of a sequence of actions to solve a problem
A random set of actions
A high-level programming language
A data file
Which of the following is a valid variable name in Python ?
1variable
variable_1
variable-1
variable.1
Which property must an algorithm have ?
Randomness
Ambiguity
Definiteness
Infinity
What are common ways to represent an algorithm ?
Pseudocode, Flowchart
Only programming code
Only machine code
Verbal description only
Which of the following is NOT a type of algorithm ?
Linear
Branching
Cyclic
Random
What is the first step in problem solving ?
Code writing
Testing
Problem analysis
Debugging
An algorithm that stops after a finite number of steps is said to be:
Infinite
erminating
Iterative
Conditional
Which method is commonly used for writing algorithms ?
HTML
CSS
Pseudocode
SQL
A step-by-step solution to a problem is called:
A flowchart
An algorithm
An error
A syntax
Which component is necessary for a flowchart ?
Syntax rules
Visual symbols
HTML tags
SQL queries
Algorithms are independent of:
Problem description
Programming languages
Execution steps
Logical flow
Which of the following is a valid variable name in C++ ?
1variable
variable1
variable-1
variable.1
What is the data type for real numbers in C++ ?
int
char
float
string
Which of these is a Python keyword ?
number
float
def
variable
What is the default value of an uninitialized int variable in C++ ?
0
1
Undefined behavior
Null
Which of the following is a string data type ?
int
char
bool
string
Which of the following correctly declares a constant in C++ ?
const int x = 5;
int const x;
int constant x;
define const x;
In Python, which symbol is used to assign a value to a variable ?
==
:=
=
=>
What is the size of 'char' data type in C++ ?
4 bytes
2 bytes
1 byte
8 bytes
Which keyword is used to define a floating-point variable in C++ ?
int
bool
float
string
Python is considered to be:
Dynamically typed
Statically typed
Machine language
Markup language
Which of the following is a correct way to represent an algorithm ?
Pseudocode
Verbal description only
Machine code
Syntax rules
Which type of algorithm involves decision making ?
Linear
Branching
Cyclic
Sequential
What is the purpose of debugging ?
Creating new algorithms
Finding and fixing errors
Compiling code
Writing pseudocode
Which data type is used to store decimal numbers in Python ?
int
float
str
bool
What is the output of 3 + 2 * 2 in Python ?
10
7
12
9
Which keyword is used to define a function in Python ?
func
function
define
def
In C++, which symbol is used for comments ?
//
/*
*/
#
What does IDE stand for ?
Integrated Development Environment
Integrated Debugging Environment
Internal Development Execution
Interface Development Environment
Which of the following is a valid loop in C++ ?
repeat
loop
while
during
Which of the following is a mutable data type in Python ?
tuple
list
string
int
What does SQL stand for ?
Structured Query Language
Simple Query Language
Sequential Query Language
Strong Query Language
Which command is used to retrieve data from a database ?
SELECT
GET
EXTRACT
FETCH
What is the size of an int in C++ (typically) ?
2 bytes
4 bytes
8 bytes
16 bytes
Which one is a Python library for creating graphs ?
NumPy
Pandas
Matplotlib
Seaborn
Which operator is used to compare two values in Python ?
=
==
=>
:=
Which loop executes at least once regardless of the condition ?
for
while
do-while
foreach
Which statement correctly closes a file in Python ?
file.close()
close(file)
file.shutdown()
shutdown(file)
What is a key feature of MongoDB ?
Relational tables
Document-based storage
Compiled queries
Flat file database
Which keyword creates a loop in Python ?
loop
repeat
while
iterate
What is the output type of the input() function in Python ?
int
str
float
bool
Which file extension is standard for a Python script ?
.txt
.py
.java
.cpp
Which keyword is used for branching in C++ ?
if
goto
continue
break
Which of the following is NOT a Python data type ?
list
dictionary
array
tuple
What is a one-dimensional array ?
Array with multiple rows and columns
Array with a single row or column
Nested array
Linked array
Which of these is a conditional operator in Python ?
<
+
*
&
Which keyword is used to terminate a loop in Python ?
stop
exit
break
end
Which data type is used to store a single character in C++ ?
int
char
float
string
Which of the following is a correct Python list ?
{1, 2, 3}
(1, 2, 3)
[1, 2, 3]
<1, 2, 3>
What is the purpose of a flowchart ?
To execute code
To describe algorithm steps visually
To compile programs
To debug code
What is indentation in Python ?
Code optimization
Visual alignment
Syntax requirement
Optional formatting
Which keyword is used to create a loop in C++ ?
for
foreach
loop
repeat
Which function is used to get the length of a list in Python ?
length()
count()
size()
len()
What is a tuple in Python ?
Mutable sequence
Immutable sequence
Mutable dictionary
Immutable dictionary
Which database uses tables and rows ?
MongoDB
Cassandra
MySQL
Neo4j
Which operator is used for logical AND in Python ?
&&
&
and
&&&
Which function is used to read input from the user in Python ?
input()
read()
get()
scanf()
Which type of error is caused by incorrect syntax ?
Runtime error
Syntax error
Logical error
Compilation error
Which library is commonly used for data science in Python ?
Flask
NumPy
Tkinter
Django
Which type of file is used to permanently store data ?
Text file
Source code
Header file
Object file
Which of the following is NOT a looping structure ?
for
while
if
do-while
Which of these is a composite data type ?
char
int
record
do-whileloat
What is a record ?
A type for functions
A group of related data items
A Python library
A SQL command
What is Matplotlib used for ?
Web development
Database management
Data visualization
Networking
What does CSV stand for ?
Comma Separated Values
Centralized Server Variable
Critical Simple Variable
Complex Separated Vector
Which keyword is used for exception handling in Python ?
except
exception
handle
catch
Which of these is NOT a database ?
MySQL
MongoDB
SQLite
Matplotlib
Which C++ keyword is used for defining constants ?
constant
const
define
static
