BCA(AI) Python Lab
BCA(AI) Python Lab
CO1 Enhance the ability to solve problems using system approaches, critical and
innovative thinking and technology to create solutions.
CO2 Understand the purpose and the process of code in python.
CO3 Understand the basics of python programming like variable and operators.
CO4 Acquire programming skills in core python programming using Control
Statements
CO5 Design and analyse the working of functions in python programming.
CO6 To work with the Files, reading and writing data from the files using python
program.
DETAILED SYLLABUS
LIST OF PROGRAMS:
** *** ****
b. Write a program to print multiplication table of a given number X1
to range X2.
4. Strings
a. Write a program to find the length of the string without using any
library functions.
b. Write a program to check if two strings are anagrams or not.
c. Write a program to check if the substring is present in a given
string or not.
5. Lists
a. Write a program to perform the given operations on a list:
i. add ii. insert iii. slicing
b. Write a program to perform any 5 built-in functions by taking any
list.
c. Write a program to get a list of the even numbers from a given list
of numbers. (use only comprehensions)
6. Tuples
a.Write a program to create tuples (name, age, address, college) for at
least two members and concatenate the tuples and print the
concatenated tuples.
b.Write a program to return the top 'n' most frequently occurring chars
and their respective counts.
7. Sets
a. Write a program to count the number of vowels in a string (No
control flow allowed).
b. Write a program that displays which letters are present in both
strings.
c. Write a program to sort given list of strings in the order of their
vowel counts.
8. Dictionaries
a. Write a program to check if a given key exists in a dictionary or
not.
b. Write a program to add a new key-value pair to an existing
dictionary.
c. Write a program to sum all the items in a given dictionary.
9. Files
a.Write a program to sort words in a file and put them in another file.
The output file should have only lower-case words, so any upper
case words from source must be lowered.
10. Classes