0% found this document useful (0 votes)
20 views

BCA 3rd Year LAB MANUAL-Python Lab

This document is a lab manual for a Python course at Sobhasaria College, outlining various programming tasks for BCA 3rd year students for the session 2024-25. It includes exercises on basic programming concepts, data structures, file handling, database operations, and multithreading. Each task aims to enhance students' practical skills in Python programming.

Uploaded by

MR. Atul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

BCA 3rd Year LAB MANUAL-Python Lab

This document is a lab manual for a Python course at Sobhasaria College, outlining various programming tasks for BCA 3rd year students for the session 2024-25. It includes exercises on basic programming concepts, data structures, file handling, database operations, and multithreading. Each task aims to enhance students' practical skills in Python programming.

Uploaded by

MR. Atul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

SOBHASARIA COLLEGE, SIKAR

LAB MANUAL – Python Lab (BCA-308)


BCA-3rd year (Session – 2024-25)

1. Write a Python program to demonstrate the use of variables, assignment, and basic arithmetic
operations.
2. Create a Python script to count the number of vowels, reverse a string, and convert the string
to uppercase.
3. Implement a Python program to demonstrate string slicing, indexing, and using string
operators like concatenation and repetition.
4. Write a Python program that checks if a given integer is even or odd using an if-else
statement.
5. Create a Python script to print the Fibonacci sequence up to a given number n using a while
loop.
6. Define a class Circle with attributes radius and methods to calculate area and circumference.
7. Write a Python program to demonstrate single inheritance by creating a base class Animal and
a derived class Dog. Implement methods to show polymorphism.
8. Create a Python script to remove duplicates from a list of numbers and sort it in ascending
order.
9. Implement a Python program to demonstrate tuple operations and built-in set methods like
union, intersection, and difference.
10. Write a Python script to identify the type of each element in a list of mixed data types using the
type() function.
11. Create a Python program that takes user input to create a dictionary, then allows searching for
keys and displays the corresponding values.
12. Write a Python script to create a nested dictionary representing a student database and
perform operations to add, modify, and display student details.
13. Develop a Python program that reads a text file, counts the number of words, and writes the
word count to a new file.
14. Implement a Python script that uses pickle to save a dictionary object to a file and then load it
back, displaying the data.
15. Write a Python program to list all files in a given directory and its subdirectories.
16. Create a Python program that uses regular expressions to validate email addresses from a list
of inputs.
17. Write a Python script to search for a specific word in a text file and replace it with another word
using regular expressions.
18. Develop a Python program that demonstrates the use of try, except, and finally blocks by
handling division by zero errors.
19. Implement a Python class that defines a custom exception NegativeNumberError and raises
this exception when a negative number is input.
20. Write a Python script that uses assertions to check whether a list is sorted, raising an assertion
error if it is not.
21. Write a Python program to connect to a SQLite database, create a table Employee, and insert
data into it.
22. Develop a Python script to connect to a SQL database, execute a query to retrieve data, and
display the results.
23. Implement a Python program to read database configuration from a file and use it to establish
a connection to the database.
24. Create a Python program that demonstrates the creation of two threads where one thread
prints even numbers and the other prints odd numbers.
25. Write a Python script that uses thread synchronization (using Lock) to ensure that two threads
access a shared resource without conflicts.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy