top of page
Search
For Loop MCQ in Python
Q1. What is the output of the following Python code? x={1:"X",2:"Y",3:"Z"} for i,j in x.items(): print(i,j,end=" ") A. 1 X 2 Y 3 Z B. 1 2 3 C. X Y Z D. 1:”X” 2:”Y” 3:”Z” Ans: A Q2. What is output of the following Python code? x = ['ab', 'cd'] for i in x: i.upper() print(x) A. [‘ab’, ‘cd’] B. [‘AB’, ‘CD’] C. [None, None] D. None of Above Ans: A (list' object has no attribute 'upper') Q3. What is the output of the following code? y= ['ab', 'cd'] f

Rajesh Singh
Dec 15, 20246 min read
Files MCQ in Python
File Processing MCQ Q1. Which function writes a list of lines in File? A. Writelines() B. Write() C. Tell() D. All of...

Rajesh Singh
Dec 2, 20246 min read
Python List MCQ Questions
Q1. What is output of below python code? dict= {1:'1', 2:'2', 3:'3'} del dict[1] dict[1] = '10' del dict[2] print (len(dict)) A. 1 B. 2 C. 3 D. 0 Ans: B Q2. Which are methods of list? A. append() B. extend() C. insert() D. All of the above Ans: D: Q3. The list.pop ([i]) is used for removing the item at the given position in the list? A. Yes B. No Ans: A: Q4. list, tuple dictionary are which types of Data Types. A. Binary Types B. Boolean Types C. Sequence Types D. None

Rajesh Singh
Dec 1, 20245 min read


Python NUMPY MCQ Questions
Python NumPy Chapter MCQ: 1. What will be print? Import numpy as np a = np. array([1,2,3,5,8]) b = np. array([0,3,4,2,1]) c = a+b c = c*a print(c[2]) A. 7 B. 12 C. 10 D. 21 Answer: D 2. What will be output for the following code? Import numpy as np ary = np. array([1,2,3,5,8]) ary = ary+1 print(ary[1]) A. 0 B. 1 C. 2 D. 3 Answer: D 3. import numpy as np. a = np.array([[1,2,3],[0,1,4]]) print(a.size) A. 1 B. 5 C. 6 D. 4 Answer: C 4. import numpy as np a = np.array([1,2,3,5,8

Rajesh Singh
Dec 1, 20247 min read
Python Function MCQ Questions
Function Python Chapter MCQ Q1. Function keyword use (a). define (b). fun (c). def (d). function ...

Rajesh Singh
Nov 30, 20246 min read
Python Function MCQ Questions
Function Python Chapter MCQ Q1. Function keyword use (a). define (b). fun (c). def (d). function Answer-(c) Q2. Function header items present (a). function name (b). parameter list (c). return value (d). Both(a)and(b) Answer-(d) Q3. Function class defind (a). class (b). function (c). method (d). module Answer-(c) Q4. Function return statement function return (a). none (b). 0

Rajesh Singh
Nov 30, 20248 min read
Python MCQ Notes PDF in Hindi and English
Python Complete Notes PDF for O Level Python Notes from 1 chapter to 5 Python Notes from 6 chapter to 9 Introduction to Programming and Algorithms & Flowcharts to Solve Problems Note with MCQ Introduction to Python Notes with MCQ Operators, Expressions and Python Statements With MCQ Sequence Data Type with MCQ: Function with MCQ: File Processing with MCQ: Scope and Modules with MCQ: Numpy Bascis with MCQ: Python Programs for Practical :

Rajesh Singh
May 20, 20221 min read
Tell function in python with example
Tell () function can be used to get the position of file handle and returns current position of file object where as Seek () function is...

Rajesh Singh
Feb 20, 20221 min read
Seek function in python with example
Seek () function is used to change the position of the file handle to a given specific position in python. File handle such as a cursor...

Rajesh Singh
Feb 19, 20221 min read
What is slicing and indexing in Python with examples?
Slicing is a Python attitude that enables accessing parts of data from the given sequence like list, tuples etc. A slice object is...

Rajesh Singh
Feb 17, 20222 min read
O Level Python Programming Language (M3R5) Book & Notes PDF
Python Completes Notes PDF in Hindi for O Level: Python Notes from 1 chapter to 5 Python Notes from 6 chapter to 9 Introduction to Programming and Algorithms & Flowcharts Introduction to Python Chapter 3: Operators, Expression and Statement Chapter 4: Sequence Date Type Chapter 5: Function in Python Chapter 6: File Processing Chapter 7: Scope and Module: Numpy Basics Chapter 9: Python Programs: Python Complete Notes in English:

Rajesh Singh
Oct 17, 20211 min read
What is difference between Compiler, Interpreter and Assembler?
Compiler: A Compiler is a program used in High level language to convert the low level language or machine code into binary information....

Rajesh Singh
Nov 10, 20201 min read
Python Modules
A module is a file containing Python definitions and statements. A module can characterize functions, classes and variables. A module can...

Rajesh Singh
Apr 14, 20202 min read


Scope of Objects and names in Python:
Scope refers to the coding region from which exacting Python object is accessible. So one cannot access any exacting object from...

Rajesh Singh
Apr 10, 20202 min read
Command Line Arguments in Python
Command Line Arguments are the arguments that are specified after the name of the program in the command line shell of the operating...

Rajesh Singh
Apr 8, 20202 min read
Python File Methods
A file object permits us to utilize, access and control all the user accessible files. One can read and write any such files. At the...

Rajesh Singh
Apr 6, 20203 min read
What is a file in Python?
File is a named location on disk to store related information. It is used to permanently store data in a non-volatile memory. Firstly we...

Rajesh Singh
Apr 6, 20202 min read
Local and Global Variables in Python
Local Variable In all-purpose, a variable that is defined in a block is available in that block only. It is not reachable outside the...

Rajesh Singh
Apr 6, 20203 min read
What is Date & Time Functions in Python?
Date, time and datetime modules give a number of functions to contract with dates, times and time intervals in Python. We manipulate...

Rajesh Singh
Apr 3, 20202 min read
What is recursion in Python with Examples?
Recursion is the process of defining something in terms of itself. A recursive function is a function defined in terms of itself via...

Rajesh Singh
Apr 3, 20202 min read
bottom of page




