O Level Python Paper January 2025
पायथन में निम्नलिखित अभिव्यक्ति का मूल्यांकन किस रूप में किया जाएगा?
What will the following expression be evaluated to in Python?
print(15.0 / 4 + (8 + 3.0)) -
Parentheses first:
-
8+3.0=11.0 (since
3.0is a float, the result is also a float)
-
-
Division operation:
-
15.0/4=3.75 (since
15.0is a float, floating-point division occurs)
-
-
Addition:
-
3.75+11.0=14.75
-
Correct Answer: A) 14.75
फ्लोचार्ट में काउंटर का उपयोग किस लिए किया जाता है?
What is a counter used for in a flowchart?
A counter in a flowchart is typically used to keep track of how many times a loop or process has been executed. It helps control iterations, often increasing or decreasing in value with each cycle, ensuring that the process stops after a defined number of repetitions.
Correct Answer: A) To track the number of iterations or occurrences
पायथन में संख्याओं को घात तक बढ़ाने के लिए प्रयुक्त ऑपरेटर का नाम बताइए?
Name the operator used in Python to raise numbersto the power?
**.Correct Answer: B) Exponentiation Operator
उस चीज़ का नाम बताइए जो डुप्लिकेट मानों की अनुमति नहीं देती है?
Name the thing which does not allow duplicate values?
- Sets: Store only unique elements. Any attempt to add a duplicate value will be ignored.
- Lists: Are ordered and mutable, and they do allow duplicate members.
- Tuples: Are ordered and immutable, and they also do allow duplicate members.
Correct Answer: A) Set
उस कथन का नाम बताइए जिसका उपयोग एक मॉड्यूल के सभी कार्यात्मकता को दूसरे में आयात करने के लिए किया जाता है।
Name the statement which is used to import all thefunctionally of one module into another.
import statement. import, is the correct keyword, there are a few variations of the import statement in Python that can achieve this, including:import module_name: This imports the entire module, and you must access its contents usingmodule_name.function_name.from module_name import *: This statement imports all public functions, classes, and variables directly into the current namespace. However, this is generally discouraged in larger projects because it can cause namespace conflicts.
assert: Used for debugging and testing to check if a condition is true.tryandException: Used for error handling.
Correct Answer: A) import
टुपल में किसी मान तक कैसे पहुँचें?
How to access a value in Tuple?
- Correct:
mytuple[1]- Tuples are an indexed collection, with the first item being at index
0, the second at index1, and so on. - To access an item, you refer to its index number within square brackets after the tuple's name.
- Tuples are an indexed collection, with the first item being at index
Correct Answer: B) mytuple [1]