Python_Documentation(intro)
Python_Documentation(intro)
Submitted By
Ayan Pal
TABLE OF CONTENTS
2. Introduction 4
3. Code 5-25
ACKNOWLEDGEMENT
One of Python’s key strengths is its application in diverse fields such as web
development, data science, artificial intelligence, machine learning, automation,
and game development. Popular frameworks like Django and Flask facilitate
web development, while libraries such as NumPy, Pandas, and TensorFlow
make it a powerful tool for data analysis and AI research. Python’s ability to
integrate with other languages and platforms further enhances its utility in both
academic and industrial settings.
OUTPUT:
CODE:
OUTPUT:
3.Write a program to accept the marks of student in Physics, Chemistry and
Biology. Display the total marks and average marks
CODE:
OUTPUT:
OUTPUT:
5. Write a program to accept a number and check: (a) whether the number is
divisible by 2 and 5. (b) Whether the number is divisible by 2 but not by 5. (c)
the number is divisible by 5 but not by 2. The program must display the
message accordingly.
CODE:
OUTPUT:
6. Write a program to find largest of two numbers.
CODE:
OUTPUT:
7. Write a program to accept a Lower case string and convert into Upper case
String.
CODE:
OUTPUT:
8. Write a Program to input name, middle name and surname of a person and
print only the initials.
CODE:
OUTPUT:
9. Write a program to accept a word/ String and display the new string after
removing all the vowels present in it.
CODE:
OUTPUT:
10. Write a Python program to check a string represent an integer or not.
CODE:
OUTPUT:
11. Write a Python program to sum of two given integers. However, if the
sum is between 15 to 20 it will return 20.
CODE:
OUTPUT:
12. Write a Python script to check if a given key already exists in a dictionary.
CODE:
OUTPUT:
13. Write a class with following specifications: Class name: employee Data
members: String name, float basic; Member functions: void getdata(): to
accept the name and basic pay Sub Class salary inherit Class employee . Data
members : float da, hra, gross, net; Member Functions: void calculate(): to
find the followings: da=50% of basic , hra= 10% of basic , gross= basic + da +
hra, pf=8.33% of (basic+da) net = gross – pf. void display() : to display the
playslip.
CODE:
OUTPUT: