Python Assignment 1
Unit 1
Two Marks Questions
[Link] are identifiers? give any two rules to use identifiers in python.
2. What is the use of input () function? give an example.
3. What is the use of range () and exit () function?
4. What is the use of break and continue statements.
5. How to import libraries in python.
6. Define exception handling. List the different types of errors
7. What are variables? How to declare variables in python.
8. what is the use of input() function in python?
9. what is indentation in python? How to declare comments in python.
Five marks Questions
1. Explain control flow statements if, else, elif with syntax and examples.
2. Explain while loop and for loop statements with examples.
3. What is exception handling? Explain its keywords with example
4. Write a program to handle exception using its keywords.
5. Explain importing libraries in python with example.
6. Define operators. Explain operator precedence and association
Python Assignment 1
Unit 2
Two marks questions
1. Define function in python. Write syntax and five an example
2. How to pass parameters to the function. Write one example.
3. Define strings in python. How create strings give with example.
4. What is the use of str() function.
5. Define list in python. Write syntax and give an example.
6. What are dictionaries? Write syntax and give example
7. What is recursive function? Write its syntax
Five Marks questions
1. Explain How to pass parameters and arguments to function call with example.
2. Explain different operations on strings with examples.
3. What are strings in python? Explain any five string methods
4. How to create list in python? explain its different list operations
5. Explain any five list methods with example of each method.
6. Explain different operations on dictionaries.
7. Explain any five dictionary methods with example on each method
8. Write a python program to implement stack operations using list.