THE BHOPAL SCHOOL OF SOCIAL SCIENCES
DEPARTMENT OF COMPUTER APPLICATIONS
12th October, 2023
NOTICE
PRACTICAL FILE SUBMISSION
AY: 2023-24
Subject: “Python Programming”
Class: B.C.A. V – Semester
Important Instructions:
Last Submission Date is on or before 31st October, 2023
All practicals are mandatory to perform.
Coding must be handwritten.
Output should be a printout and must have your name, class and section on it.
Submission will be considered only in Cardboard files.
LIST OF PRACTICALS
1. Write a program to enter a number by the user and display the double of numbers till that number.
2. Write a program to enter 2 numbers by the user and check whether the numbers are equal, greater
or smaller than each other.
3. Write a program to display the table of a number entered by the user using for loop and while
loop.
4. Write a program to check whether the number entered by the user is a Buzz number or not (Buzz
numbers are those numbers that are divisible by seven or end with seven).
5. Display all numbers which are multiple of 17, but not the multiple of 5, between 2000 and 2500.
6. Write a program to print the first 2 and last 3 Characters in a given string using string slicing.
7. Write a program that Eliminates duplicates in a list.
8. Find the largest of n numbers, using a user define function largest().
9. Write a function that capitalizes all vowels in a string.
10. Write a Program to give the count of digits and letters, of a string entered by the user.
11. Write a function myReversel() which takes a string as an input and returns the reverse of the
string.
12. Display the squares and cubes of all odd numbers by taking lower limit and upper limit values
by the user.
13. Write a program to sort (ascending and descending) a dictionary by value.
14. Enter a list of students, each represented as a dictionary with keys like 'name', 'age', 'marks_1',
'marks_2', and 'marks_3'. Write a program to display the student’s name with the highest average
marks.
15. Write a Python script to add a key to a dictionary.
Sample Dictionary: {0: 15, 1: 55}
Expected Result: {0: 15, 1: 55, 2: 95}
THE BHOPAL SCHOOL OF SOCIAL SCIENCES
DEPARTMENT OF COMPUTER APPLICATIONS
16. Enter a word, create a dictionary with the letters of this word as keys, and the corresponding
ASCII values as values.
17. Write a python program to check whether a key entered by the user already exists in a dictionary.
18. Write a python program to replace a specific line in existing file [Link].
19. Write a Python to input 2 Python dictionaries and display after merging both of them.
20. Write a Python program that takes input from the user using readString() and:
i. capitalizes the input string, and then prints the modified string using PrintString().
ii. converts the content to uppercase, and then writes the modified text into a new file named
"[Link]" using writeString().
21. Write a MySQL-Python connectivity to retrieve data, one record at a time, from city table for
employees with id less than 10.
22. On the basis of the following table, answer the given questions:
i. Write the degree and cardinality of the above table.
ii. What will be the output of the following query:
Select max(DOJ) from Customer_Details;
iii. Write the SQL query to delete the row from the table where customer has no accumulated
amount.
23. Given below are the sugar levels for men and women in a city.
blood_sugar_men=[113, 85, 90, 150, 149, 88, 93, 115,135,80, 77, 82, 129]
blood_sugar_women=[67, 98, 89, 120, 133, 150, 84, 69,89, 79, 120, 112, 100]
Compare the sugar levels amongst them through a histogram (as follows).
THE BHOPAL SCHOOL OF SOCIAL SCIENCES
DEPARTMENT OF COMPUTER APPLICATIONS
24. Plot a labeled matplotlib bar chart to depict the popularity of various programming languages as
shown below.
25. Generated a line plot displaying the following date:
year = [1920, 1930, 1940, 1950, 1960, 1970, 1980, 1990, 2000, 2010]
unemployment_rate = [9.8, 12, 8, 7.2, 6.9, 7, 6.5, 6.2, 5.5, 6.3]
The output should look like this.
Dr. Vijay Panse Ms. Swati Sharma
Teacher In-charge Head of Department