Chapter 1 computer system Flashcards
What does IP stand for in the context of Class 11 IP?
Informatics Practices
True or False: The primary focus of the Class 11 IP curriculum is on programming concepts.
True
Fill in the blank: The programming language primarily taught in Class 11 IP is _____.
Python
What is a variable in programming?
A variable is a named storage location in memory that holds data which can be changed during program execution.
Which data type is used to represent whole numbers in Python?
Integer
What is the purpose of a loop in programming?
A loop is used to execute a block of code multiple times.
Multiple Choice: Which of the following is not a valid Python data type? A) List B) Tuple C) Set D) Character
D) Character
What is the output of the following code: print(2 ** 3)?
8
True or False: A list in Python can hold items of different data types.
True
What is the syntax for defining a function in Python?
def function_name(parameters):
Fill in the blank: The _____ statement is used to exit a loop in Python.
break
What is the purpose of the ‘if’ statement in programming?
An ‘if’ statement is used to execute a block of code conditionally based on whether a condition is true.
Multiple Choice: Which of the following is used to comment a single line in Python? A) // B) # C) /* D) –
B) #
What is a dictionary in Python?
A dictionary is a collection of key-value pairs where each key is unique.
True or False: In Python, strings are immutable.
True
What is the purpose of the ‘return’ statement in a function?
The ‘return’ statement is used to exit a function and return a value to the caller.
Fill in the blank: In Python, the _____ function is used to read input from the user.
input
What is the difference between a list and a tuple in Python?
A list is mutable, while a tuple is immutable.
Multiple Choice: Which Python keyword is used to handle exceptions? A) try B) catch C) except D) all of the above
D) all of the above
What is an algorithm?
An algorithm is a step-by-step procedure or formula for solving a problem.
True or False: A for loop is used for iterating over a sequence.
True
What does IDE stand for?
Integrated Development Environment
Fill in the blank: The _____ operator is used to compare two values for equality in Python.
==
What is a syntax error?
A syntax error occurs when the code does not conform to the rules of the programming language.
Multiple Choice: Which of the following is a built-in function in Python? A) print() B) display() C) show() D) output()
A) print()
What is the purpose of the ‘pass’ statement in Python?
The ‘pass’ statement is a null operation used as a placeholder in code.