UNIT WISE ASSIGNMENT _PYTHYON.pdf
UNIT WISE ASSIGNMENT _PYTHYON.pdf
Phaphamau, Prayagraj
UNIT 1 ASSIGNMENT
1. Discuss various categories of operators in python. Find and explain stepwise solution
of following expressions if a=3, b=, c=10
(a) a&b<<2//5*2+c^b
(b) b>>a**2<<2>>b**2 ^c**3
2. Discuss why python is interpreted language. Explain history and features of python
while comparing python versions 2 and 3.
3. Answer the following question in brief.
(a) Discuss why python is called as dynamically or strongly typed language.
(b) Programming cycle of python.
4. Explain in brief.
5. What is the short circuit evaluation? What is printed by the following python program.
A=0
B=2
C=3
X=C or A
print(X).
6. Answer in brief.
(a) In some language every statement ends with a semi-colon. What happens if you
put a semi-colon at the end of python statement?
(b) Mention five benefits of using python.
7. What is python? What are the tools that help to find bugs or perform static analysis?
What are python decorators?
9. Explain in brief.
(a) What type of language is python.
(b) What are local and global variables in python.
(c) Define floor division with example.
UNIT 2 ASSIGNMENT
1. Write python code snippet for displaying ‘n’ terms of Fibonacci using recursion.
2. Write a program to generate prime number.
3. Compare list and tuple data structure with example. Explain list comprehension.
4. Answer in brief.