0% found this document useful (0 votes)
158 views

Python Question Bank 11

This document contains a question bank with questions related to Python programming concepts across three units: Unit 1 covers Python characteristics, numeric data types, operators, variables (global, local), control flow statements (for, while loops), functions (factorial, greatest of three numbers), and basic input/output. Unit 2 covers strings (slicing, functions), functions (definition, parameters, return values), and string methods (length, case conversion). Unit 3 compares data structures (lists, tuples, dictionaries), explains each with examples, and covers their inbuilt functions and operators. It also discusses mutability of lists and tuples.

Uploaded by

tanaythakre22o9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views

Python Question Bank 11

This document contains a question bank with questions related to Python programming concepts across three units: Unit 1 covers Python characteristics, numeric data types, operators, variables (global, local), control flow statements (for, while loops), functions (factorial, greatest of three numbers), and basic input/output. Unit 2 covers strings (slicing, functions), functions (definition, parameters, return values), and string methods (length, case conversion). Unit 3 compares data structures (lists, tuples, dictionaries), explains each with examples, and covers their inbuilt functions and operators. It also discusses mutability of lists and tuples.

Uploaded by

tanaythakre22o9
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Vidarbha Youth Welfare Society’s

Prof. Ram Meghe Institute of Technology & Research, Badnera-Amravati


Department of First Year Engineering
Question Bank of Python

Unit No – 1
1) Explain various characteristics / features of Python ?
2) Explain Numeric Data Types with Example
3) Write a program to find sum of first 20 even no using for loop.
4) Write a program to find sum of first 20 even no using while loop
5) Write a program to find sum of Square of first 20 even no using
for loop.
6) Write a program to find sum of Square of first 20 even no using
while loop
7) Explain various operators in python
8) Write a program to print 5 factorial using for loop
9) Write a program to print 5 factorial using while loop
10) Define following
i. Variable
ii. Global Variable
iii. Local Variable
iv. Data Types

11) Write a program to read a no. from user and display


greatest of three no.
12) Write a program to print the sum of no. 1 to 10 using while
loop.
13) Write a program to print the sum of no. 1 to 10 using for
Loop.
14) Write a simple program to demonstrate the use of ‘int’, ‘input’ and
‘print’ function.
15) Write a program to read the length and breadth of a rectangle
from user and display the area of rectangle.
16) What is ‘eval’ function? When it is useful in program? Explain in
detail with example.
17) Identify the errors in the following piece of code and list it out
below. Also write a corrected code.
Num1 = int(‘10’)
num2 = eval(20.99)
sum = num1 + num2:
print(‘sum’)
18) What do you mean by operator precedence and associativity.
Explain in detail with the separate example of calculation.
19) Explain Following
i. Arithmetic Operator
ii. Relational Operator
iii. Logical Operator
Unit No – 2
1) Explain Strings in python.
2) Explain String Slicing in details with example.
3) Explain various string handling Function
1. Explain with example:
i. Function Header iii. Parameter v. Function Name.
ii. Function Body iv. Argument
2. Is it possible to return multiple values from a function? Support your
opinion with logic and example.
4) Define following
i. lower( )
ii. upper( )
iii. capitalize( )
iv. len( )
5) Write a program to read a string from user and then perform
following operation on it and display result.
 Find length
 Convert to Upper case
 Convert to Lower case
 Title
6) Explain Mutable & Immutable Strings with Example?
7) What is an indexing in Python? Explain Positive Index & Negative Index?
How does it help in accessing characters?
8) Explain Function in Details?
9) Explain Following
i. Syntax for function defining
ii. Function Argument
iii. Return function
10) What is function? Explain how arguments are passed and results
are returned? With example.
Unit No. -3
1) Compare List & Set
2) Compare Tuple & Dictionary
3) Explain Sequence data types / Data Structures in python
4) Explain List in details with example.
5) Explain Tuple in details with examle
6) Explain String in details with example.
7) Explain Dictionary in details with example.
8) What are inbuilt functions of list? Explain function of each one by one
with example.
9) What are operators of list? Explain function of each one by one with
example.
10) What are inbuilt functions of Tuple? Explain function of each one
by one with example.
11) Explain basics of dictionary? Why there is need of dictionary in data
structure?
12) List is mutable and tuple is immutable. Justify with an example.

You might also like