0% found this document useful (0 votes)
20 views2 pages

BCA(AI) Python Lab

The document outlines the course outcomes and detailed syllabus for a Python programming lab course, focusing on problem-solving, coding processes, and fundamental programming concepts. It includes a list of programming tasks categorized by topics such as input/output, variables, loops, strings, lists, tuples, sets, dictionaries, files, and classes. Each category contains specific programming exercises aimed at developing practical skills in Python.

Uploaded by

udit mishra
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 views2 pages

BCA(AI) Python Lab

The document outlines the course outcomes and detailed syllabus for a Python programming lab course, focusing on problem-solving, coding processes, and fundamental programming concepts. It includes a list of programming tasks categorized by topics such as input/output, variables, loops, strings, lists, tuples, sets, dictionaries, files, and classes. Each category contains specific programming exercises aimed at developing practical skills in Python.

Uploaded by

udit mishra
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

BCAA-152P: PROGRAMMING IN PYTHON LAB

Course Outcome (CO)

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:

1. Input and Output


(a) Write a program to find the largest element among three
Numbers.
(b) Write a program to print the sum of all the even numbers in the
range 1 - 50 and print the even sum.
(c) Write a Program to display all prime numbers within an interval
of given X1 & X2.

2. Variables and Functions


a. Write a program to swap two numbers without using a temporary
variable.
b. Write a program to define a function with multiple return values.
c. Write a program to define a function using default arguments.

3. Loops and conditionals


a. Write a program to print the
following patterns using loop: *

** *** ****
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.

e.g. aaaaabbbbcccc, 2 should return [(a 5) (b 4)]

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.

b.Write a program to find the most frequent words in a text. (read

from a text file).

10. Classes

a. Write a Python class named Person with attributes name, age,


weight (kgs), height (ft) and takes them through the
constructor and exposes a method get_bmi_result() which
returns one of "underweight", "healthy", "obese".
b. Write a Python class named Circle constructed by a radius and
two methods which will compute the area and the perimeter
of a circle.

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