Python QB
Python QB
2 Marks Questions
1.Write use of matplotlib package in python.
2.Write down the output of the following Python code
>>>indices=['zero','one','two','three','four','five']
i) >>>indices[:4]
ii) >>>indices[:-2]
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.
4. Write the output for the following if the variable course = “Python”
>>> course [ : 3 ]
>>> course [ 3 : ]
>>> course [ 2 : 2 ]
>>> course [ : ]
>>> course [ -1 ]
>>> course [ 1 ]
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.