0% found this document useful (0 votes)
3 views2 pages

Python Programming Concepts and Examples

The document contains a series of questions related to Python programming, categorized into 2 Marks and 4 Marks questions. Topics include the use of the matplotlib package, Python data structures like lists, tuples, and sets, user-defined functions, and standard packages such as Numpy and Pandas. Additionally, it includes programming tasks such as set operations, finding the largest and smallest numbers in a list, and using modules.

Uploaded by

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

Python Programming Concepts and Examples

The document contains a series of questions related to Python programming, categorized into 2 Marks and 4 Marks questions. Topics include the use of the matplotlib package, Python data structures like lists, tuples, and sets, user-defined functions, and standard packages such as Numpy and Pandas. Additionally, it includes programming tasks such as set operations, finding the largest and smallest numbers in a list, and using modules.

Uploaded by

roshanipbhor
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PWP - QB

2 Marks Questions
[Link] use of matplotlib package in python.
[Link] down the output of the following Python code
>>>indices=['zero','one','two','three','four','five']
i)​ >>>indices[:4]
ii)​ >>>indices[:-2]

[Link] Local and Global variable.


[Link] four Buit-in tuple functions python with example.
[Link] how to create user defined function in python with example.
[Link] between list and tuple
[Link] any two characteristics of a python set
[Link] a python program to find the union and difference of two set

4 Marks question
1. Write python program to perform following operations on set.
i)​ Create set of five elements
ii)​ Access set elements
iii)​ Update set by adding one element
iv)​ Remove one element from set.

2. Describe following Standard Packages i) Numpy ii) Pandas

3. What is the output of the following program?


dict1 = {‘Google’ : 1, ‘Facebook’ : 2, ‘Microsoft’ : 3}
dict2 = {‘GFG’ : 1, ‘Microsoft’ : 2, ‘Youtube’ : 3}
dict1⋅update(dict2)
for key, values in dict1⋅items( ):
print (key, values)

4. Write the output for the following if the variable course = “Python”
>>> course [ : 3 ]
>>> course [ 3 : ]
>>> course [ 2 : 2 ]
>>> course [ : ]
>>> course [ -1 ]
>>> course [ 1 ]

5. Explain any four Python's Built-in Function with example


6. Explain Module and its use in Python.
PWP - QB

7. Write a Python Program to accept values from user in a list and find the largest
number and smallest number in a list.
8. Explain any six set function with example
9. Write a program for importing module for addition and substraction of two
numbers.

You might also like