PYTHON Assignment
PYTHON Assignment
PYTHON Assignment
Day 1:
No Questions.
Day 2:
1. Given String “ExcellenC”, print the last 3 letters using String slicing methods.
3. Given Dictionary
Students = {
"student1" : {
"name" : "Ram",
"age" : 15
},
"student2" : {
"name" : "Vimal",
"age" : 16
},
"student3" : {
"name" : "Mahesh",
"age" : 15
}
}
Day 3:
1. Write a program to take salary as input from the user and print the Bonus amount to be
paid according the table below.
Salary Bonus percentage
0-20,000 10 %
20,000-40,000 8%
40,000 -60,000 6%
60,000-80,000 5%
80,000 and above 4%
2. Write a program to print all the prime numbers between 10 – 50.
Day 4:
(After user selecting the operation. Take two inputs from the user and print the answer.)
Day 5: Given a String below.
Hello I’m Raj, my mobile number is +91-9876765899 and email id is [email protected]. My Professional
Email is [email protected] and phone number is 040- 2254785.
Extract the phone numbers and email addresses from the string using RegEx and print them.
Day 6:
1. Write a program to create a text file with Python and insert text “Data Analytics is the trending course in
market.” And close the File.
Use Exceptional Handling and Log all the steps into a log file with time stamp. (Creating, writing and
closing)
Day 7:
Write a Python class Employee with attributes like emp_id, emp_name, emp_salary, and
emp_department and methods like calculate_emp_salary, emp_assign_department, and
print_employee_details.
Day 10:
From the given Covid19 Dataset Find the average number of cases recorded for each country and store them
to a new CSV file.
Day 11:
Write a NumPy program to create an element-wise comparison (greater, greater_equal, less and less_equal) of
two given arrays.
Day 12:
Write a Python programming to create a pie chart of the popularity of programming Languages.
Sample data:
Programming languages: Java, Python, PHP, JavaScript, C#, C++ Popularity: 22.2, 17.6, 8.8, 8,
7.7, 6.7