2023 Sample QB
2023 Sample QB
2023 Sample QB
4 Marks
1. Explain two Membership and two logical operators in python with appropriate
examples.
2. Describe any four methods of lists in Python
3. Comparing between local and global variable
4. Write a python program to print Fibonacci series up to n terms
5. Write a program to input any two tuples and interchange the tuple variable.
6. Explain different loops available in python with suitable examples.
7. Use of any four methods of tuple in python?
8. Write the output for the following if the variable fruit=’banana’: >>>fruit[:3]
>>>fruit[3:] >>>fruit[3:3] >>>fruit[:]
9. Determine various data types available in Python with example
10. Write a python program to calculate factorial of given number using function
11. Show the output for the following: 1. >>> a=[1,2,3] >>>b=[4,5,6] >>> c=a+b 2.
>>>[1,2,3]*3 3. >>>t=[‘a’,’b’,’c’,’d’,’e’,’f’] >>>t[1:3]=[‘x’,’y’] >>>print t
12. Describe Set in python with suitable examples.
13. Describe bitwise operators in Python with example.
14. Write any four methods of dictionary.
15. What is local and global variables? Explain with appropriate example.
16. Write python program to illustrate if else ladder.
17. Write basis operations of list
18. Write Python code for finding greatest among four numbers.
19. Compare list and dictionary. (Any 4 points)
20. Write a program to print following:
1
12
123
1234
21. Explain four Buit-in tuple functions python with example.
22. List Data types used in python. Explain any two with example
23. Explain membership and assignment operators with example
24. Explain indexing and slicing in list with example.
25. Explain decision making statements If- else, if- elif- else with example.
26. Explain building blocks of python.
27. 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