Python Assignments 1 To 4
Python Assignments 1 To 4
1. Define: - Python
2. Give the difference between Scripting Language and Programming Language.
3. List and explain features of Python. (Winter -22, Summer – 23).
4. Write Application of python.
5. Give the difference between intermediate mode and script mode?
6. What is a statement and multi-line statement?
7. What are strings, variable python numbers and standard data types in python?
8. Explain basic structure of Python Program.
9. Explain keyword, identifier and variable.
10. Explain data type with example.
11. Explain input and print method of python.
12. Explain Input and Output statements in Python by giving examples. (Summer – 23).
13. Explain type casting with example. (Winter -22)
14. List out operator and explain bitwise operator.
15. List out arithmetic operations. Build python code that performs three arithmetic operations.
(Summer – 23).
16. List out the rules for defining variables and explain the assignment operators of python in
details. (Summer – 23).
SMG
Assignment: 2
SMG
Assignment: 3
SMG
Assignment: 4
Winter 22
And
𝑅
Compound interest = [(1 + (100∗𝑁)
) 𝑁∗𝑇 − 1]
Where
P = Principal amount,
R = Rate of interest,
T = Total duration,
N = Number of times interest got compounded annually.
2. Write a program to find the sum of following series:
1 1 1
1 + 3 + 5 + 7 … . . 𝑁 𝑡𝑒𝑟𝑚𝑠.
3. Write a program that find whether a given year is a leap year or not.
4. Write a program to print following pattern.
1
22
333
4444
55555
5. Write an automated censor program that reads the text from a file and creates a new file where
all of the four-letter words have been replaced by “****”.
6. Write a program to find the number of times an element occurs in the list.
SMG
Summer 23
**
***
****
*****
3. Create a Python program to display the following patterns using loop concept.
12
123
1234
12345
SMG