0% found this document useful (0 votes)
7 views4 pages

questionbank for python

The document outlines various chapters covering fundamental concepts in Python programming, including features, variables, data structures, control statements, functions, and exception handling. It includes programming exercises such as creating calculators, geometric calculations, and working with lists, tuples, and dictionaries. Additionally, it discusses libraries like Numpy and Pandas, along with file handling and exception management.

Uploaded by

anonymous1112acc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views4 pages

questionbank for python

The document outlines various chapters covering fundamental concepts in Python programming, including features, variables, data structures, control statements, functions, and exception handling. It includes programming exercises such as creating calculators, geometric calculations, and working with lists, tuples, and dictionaries. Additionally, it discusses libraries like Numpy and Pandas, along with file handling and exception management.

Uploaded by

anonymous1112acc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Chapter No.

1
• Explain Features of Python
• What is Variable? Write naming rules.
• Explain Structure of Python.
• Write note on Data Structure in Python
• Write a program to accept 2 numbers from user and perform addition, subtraction,
multiplication.
• Write a program to display use of format() function.
• Write a program to accept string from user and display that string along with message
“How are you?”
• Write a program to create tuple of 7 element and display
• Full tuple
• 2nd to 4th elements
• 5th to End

1. Write a program to simulate a

simple calculator (+ - / * %)
that takes two operands as input and displays the result
2. Write a program to find area and perimeter of 3 geometric objects.

Chapter No. 2

• Explain if elif statement with example.

• Explain decision making statements If - else, if - elif - else with example.

• Write a program to check whether given number is even or odd

• Write a program to find greater number among three numbers accepted from user

• Write note on range () function

• Explain looping statements with syntax

• Explain any 10 String function with example

• Write a program for printing table of 5 using loop

• Write a program for following output


1
22
333
4444
55555

If the ages of three brothers are input through the keyboard, write a python Program to
determine the youngest and oldest of the three.

WAP to check whether given number is Perfect number or not


. WAP to check whether given number is Prime number or not

Chapter No. 3

• Describe various list functions.


• Justify the statement “Lists are mutable”

• Write a program to input any two tuples and interchange the tuple variable.

• Define empty tuple. Write syntax to create empty tuple.


• Compare tuple with list (Any 5 points)

• Create a tuple and find the minimum and maximum number from it.
• Write a Python program to find the repeated items of a tuple.
• Print the number in words for Example: 1234 => One Two Three Four

• Describe the various set operations


• Write a Python script to sort (ascending and descending) a dictionary by value.
• Write a Python script to concatenate following dictionaries to create a new one.
Sample Dictionary: dic1 = {1:10, 2:20}
dic2 = {3:30, 4:40}
dic3 = {5:50,6:60}
• Write a Python program to combine two dictionary adding values for common
keys.
• d1 = {'a': 100, 'b': 200, 'c':300}
• d2 = {'a': 300, 'b': 200, 'd':400}
Write a program to create dictionary of students that includes their ROLL NO. and
NAME.
i) Add three students in above dictionary
ii) Update name = ‘Shreyas’ of ROLL NO = 2
iii) Delete information of ROLL NO = 1

2. Count all letters, digits, and special symbols from a given string.
3. Write a Python program to get the largest number from a list.
Write a Python program to get the smallest number from a list
Write a Python program to count all elements in list and count Occurrences Of A List Item
In Python

Chapter No. 4

• What is function? Write syntax with example.


• Explain Lambda Function.
• Write note on Scope of variables.
• Comparing between local and global variable
 What is Python Module? Explain with example
 Write a program to create a class named Person, use the __init__() function to assign
values for name and age, display them for 2 object and delete any one object.
 What is inheritance? Explain its types.
 Write a program which shows implementation for multiple inheritance.
 Design a class Employee with data members: name, department and salary. Create
suitable methods for reading and printing employee information
Write a program in to check a given number is even or odd using the function.
3. Write a function Exchange to interchange the values of two variables, say x and y.
illustrate the use of this function in a calling function.
 4. Write a program to find Sum of natural number using recursion.

Chapter No. 5
 Write a program for
o Creating a 3X4 array with all zeros
o ii)Create a constant value array of complex type
o ii)Create a sequence of integers from 0 to 30 with steps of 5
 Write a program for performing matrix addition , subtraction and multiplication
 Explain package Numpy with example.
 Explain package Pandas with example.
 Write note on matplotlib library.
 Explain Data Structures in Pandas Library
 Explain operation on DataFrame.
 Write a program for binary search.

Chapter No. 6
 How to create user define exception explain with example.
 What is exception handling? List any 10 standard exceptions.
 What are the file Object Attributes, explain with example.
 Describe various modes of file object? Explain any two in detail
 Show how try…except blocks is used for exception handling in Python with example
 Write a program to open a file in write mode and append some contents at the end of
file.

You might also like