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

Python Programming Concepts and Examples

The document contains questions related to various Python concepts for a 2 and 4 mark exam. Some of the key concepts covered include: 1. Python features like lists, tuples, lambda functions, file operations, indentation, interpreter 2. Operators like membership, logical, comparison; methods of lists and tuples 3. Variables - local vs global, Fibonacci series, swapping tuples 4. Loops, data types with examples, functions, if-else ladder 5. List operations, finding max of 4 numbers, comparing lists and dictionaries 6. Membership and assignment operators, indexing and slicing lists, decision making 7. Building blocks, dictionary to store student data -

Uploaded by

Pankaj Sangale
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)
79 views2 pages

Python Programming Concepts and Examples

The document contains questions related to various Python concepts for a 2 and 4 mark exam. Some of the key concepts covered include: 1. Python features like lists, tuples, lambda functions, file operations, indentation, interpreter 2. Operators like membership, logical, comparison; methods of lists and tuples 3. Variables - local vs global, Fibonacci series, swapping tuples 4. Loops, data types with examples, functions, if-else ladder 5. List operations, finding max of 4 numbers, comparing lists and dictionaries 6. Membership and assignment operators, indexing and slicing lists, decision making 7. Building blocks, dictionary to store student data -

Uploaded by

Pankaj Sangale
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

2 Marks

1. List Python features. (Any four)


2. List comparision operators in Python.
3. Describe Tuples in Python.
4. Write use of lambda function in python
5. List file operations in Python.
6. Describe indentation in Python.
7. Name different modes of Python
8. List identity operators
9. List different Object Oriented features supported by Python
10. Give two differences between list and tuple
11. Explain Local and Global variable.
12. How to give single and multiline comment in python.
13. Describe Python Interpreter

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

You might also like