0% found this document useful (0 votes)
14 views12 pages

Practical File

This document outlines the practical assignments for the B.A. English Honours program at Shyam Lal College for the batch 2024-27, specifically for the Programming using Python course. It includes a series of programming tasks that students must complete, such as calculating total marks and grades, printing factors of a number, and creating lists and dictionaries. Each practical task specifies the input and expected output format.

Uploaded by

romzop00
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)
14 views12 pages

Practical File

This document outlines the practical assignments for the B.A. English Honours program at Shyam Lal College for the batch 2024-27, specifically for the Programming using Python course. It includes a series of programming tasks that students must complete, such as calculating total marks and grades, printing factors of a number, and creating lists and dictionaries. Each practical task specifies the input and expected output format.

Uploaded by

romzop00
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/ 12

SHYAM LAL COLLEGE

B.A. English Honours


BATCH: 2024-27

YEAR: 1
SEMESTER: 1
NAME: Romir Sharma
ROLL NO.: 241138
SECTION: B
SUBJECT: Programming using Python
pccPpPythPython
PRACTICAL FILE
SUBMISSION DATE: 02/01/2025

SUBMITTED TO:
DR. Pranav Das
PRACTICAL 1 :-
WAP TO CALCULATE TOTAL MARKS,PERCENTAGE AND GRADE OF A STUDENT.
MARKS OBTAINED OF EACH THREE SUBJECTS ARE TO BE INPUT BY THE USER.
ASSIGN GRADE ACCORDING TO THE FOLLOWING CRITERIA:
Grade A: if Percentage >= 80
Grade B: if Percentage >= 60 and Percentage < 80
Grade C: if Percentage >= 40 and Percentage < 60
Grade D: if Percentage < 40

INPUT:

OUTPUT:
PRACTICAL 2 :-
WAP to print factors of a given number.

INPUT:

OUTPUT:
PRACTICAL 3 :-
WAP to add N natural numbers and display their sum.

INPUT:

OUTPUT:
PRACTICAL 4 :-
WAP to print the following conversion table (use looping constructs):

INPUT:

OUTPUT:
PRACTICAL 5 :
WAP that takes a positive integer n and the produce n lines of output as shown:
*
**
***
****
(sample output for n = 4)

INPUT:

OUTPUT:
PRACTICAL 6 :
Write a menu driven program using user defined functions to print the area of
rectangle, square, circle and triangle by accepting suitable input from user.

INPUT:

OUTPUT:
PRACTICAL 7 :
Write a function that calculates factorial of a number n.

INPUT:

OUTPUT:
PRACTICAL 8 :
WAP to print the series and its sum: (use functions)
1/1! + 1/2! + 1/3! …….1/n!

INPUT:

OUTPUT:
PRACTICAL 9 :
WAP to perform the following operations on an input string
a. Print length of the string
b. Find frequency of a character in the string
c. Print whether characters are in uppercase or lowercase

INPUT:

OUTPUT:
PRACTICAL 10:
WAP to create two lists: one of even numbers and another of odd numbers. The
program should demonstrate the various operations and methods on lists.

INPUT:

OUTPUT:

PRACTICAL 11:
WAP to create a dictionary where keys are numbers between 1 and 5 and the
values are the cubes of the keys.

INPUT:

OUTPUT:
PRACTICAL 12:
WAP to create a tuple t1 = (1, 2, 5, 7, 2, 4). The program should perform the
following:
a. Print tuple in two lines, line 1 containing the first half of tuple and second line
having the second half.
b. Concatenate tuple t2 = (10, 11) with t1.

INPUT:

OUTPUT:

You might also like