The document contains a series of questions related to Python programming, covering topics such as data structures, operators, variables, and control statements. It includes both theoretical questions and practical programming tasks, such as creating dictionaries and manipulating lists. The questions are designed to test knowledge and understanding of Python concepts and syntax.
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 ratings0% found this document useful (0 votes)
7 views2 pages
Question Bank
The document contains a series of questions related to Python programming, covering topics such as data structures, operators, variables, and control statements. It includes both theoretical questions and practical programming tasks, such as creating dictionaries and manipulating lists. The questions are designed to test knowledge and understanding of Python concepts and syntax.
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/ 2
QUESTIONS FOR 2 MARKS
1. Name different modes of python.
2. List identity operators in python. 3. Give two differences between list and tuple. 4. Explain Local and Global variable. 5. List features of Python. 6. Describe membership operators in python. 7. Write down the output of the following Python code >>>indices=['zero','one','two','three','four','five'] i) >>>indices[:4] ii) >>>indices[:-2] 8. Enlist any four data structures used in python. 9. Write the use of elif keyword in python. 10. Describe the Role of indentation in python. 11. Explain two ways to add objects / elements to list. 12. List comparisons operators in Python 13. Write use of lambda function in python.
QUESTIONS FOR 2 MARKS
1. 1)Write a program to print following:
1 12 123 1234 2. Explain membership and assignment operators with example. 3. Explain indexing and slicing in list with example. 4. 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 5. Explain decision making statements If - else, if - elif - else with example. 6. Explain building blocks of python. 7. Write the output of the following : i) >>> a = [ 2, 5, 1, 3, 6, 9, 7 ] >>> a [2 : 6 ] = [ 2, 4, 9, 0 ] >>> print (a) ii) >>> b = [ “Hello” , “Good” ] >>> b. append (“python” ) >>> print (b) iii) >>> t1 = [ 3, 5, 6, 7 ] >>> print ( t1 [2] ) >>> print ( t1 [–1] ) >>> print ( t1 [2 :] ) >>> print ( t1 [ : ] )
8)Explain Bitwise operator in Python with appropriate example.
9)Write a Python Program to check if a string is palindrome or not.