Class 11-CS-Practical File-Vivaan Garg
Class 11-CS-Practical File-Vivaan Garg
Session 2023-24
PROGRAM FILE
Made By
Name: Vivaan Garg
Class: 11A
Elective: E2
ACKNOWLEDGEMENT
Completing this computer science assignment has been a fantastic
learning journey for me. I've not only gained knowledge but also
grown as a person during this process. I want to express my
heartfelt
thanks to my computer science teacher, Ms. Harmeet Kaur, for her
unwavering support and excellent guidance. Her help has been crucial
in my progress. This project introduced me to new perspectives,
improved my understanding of the subject, and made me a better
problem solver. I'm truly grateful for this enlightening experience and
I'm excited about how the knowledge I've gained will positively
impact my future adventures in the fascinating world of computer
science.2
CERTIFICATE
This is to certify that ___________________________, student
of class XI has successfully completed these practical under the
guidance of Ms. Harmeet Kaur during the academic year 2023-
24 in partial fulfilment of computer practical examination
requirement for year-end examination.
Date: ________________________
INDEX
SN DATE PAGE
PROBLEM STATEMENT NO.
O.
Case Studies:-
PROGRAM CODE:
PROGRAM #2
PROBLEM STATEMENT:
Write a Python program to convert temperature from Celsius to Fahrenheit.
Prompt the user to enter the temperature in Celsius as a floating-point number
and display the corresponding temperature in Fahrenheit.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
PROGRAM #3
PROBLEM STATEMENT:
Write a Python program to convert height from feet and inches to centimetres.
Prompt the user to enter the height in feet and the remaining height in inches
as integers. Display the height in centimetres as a floating-point number.
PROGRAM CODE:
PROGRAM #4
PROBLEM STATEMENT:
Write a Python program to convert distance from kilometres to miles and
volume from litters to gallons. Prompt the user to enter the distance in
kilometres and volume in litters as floating-point numbers. Display the
corresponding distance in miles and volume in gallons.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
PROGRAM #5
PROBLEM STATEMENT:
Write a Python program to calculate the simple interest for a given principal
amount, rate of interest, and time period. Prompt the user to enter the
principal amount, rate of interest (as a percentage), and time period (in years)
as floating-point numbers. Display the simple interest as a floating-point
number.
PROGRAM CODE:
PROGRAM #6
PROBLEM STATEMENT:
Write a Python program to calculate the Body Mass Index (BMI) for a person based on
their weight and height. Prompt the user to enter their weight in kilograms and height in
meters as floating-point numbers. Calculate the BMI using the formula: BMI = weight /
(height * height) and display the result as a floating-point number.
PROGRAM CODE:
10
PROGRAM #7
PROBLEM STATEMENT:
Write a Python program to solve a quadratic equation of the form ax^2 + bx + c = 0.
Prompt the user to enter the values of coefficients a, b, and c as floating-point numbers.
Display the solutions of the equation (real and imaginary, if any) in a readable format.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
11
PROGRAM #8
PROBLEM STATEMENT:
Write a Python program to convert temperature from Fahrenheit to Celsius. Prompt the
user to enter the temperature in Fahrenheit as a floating-point number and display the
corresponding temperature in Celsius.
PROGRAM CODE:
12
PROGRAM #9
PROBLEM STATEMENT:
Write a Python program to check if a given number is positive, negative, or zero.
. PROGRAM CODE:
13
PROGRAM #10
PROBLEM STATEMENT:
Write a Python program to determine if a given number is even or odd.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
14
PROGRAM #11
PROBLEM STATEMENT:
Write a Python program to check if a year is a leap year or not.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
15
PROGRAM #12
PROBLEM STATEMENT:
Write a Python program to calculate the grade based on a student's score (e.g., A, B, C, D,
F).
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
16
PROGRAM #13
PROBLEM STATEMENT:
Write a Python program to check if a triangle is equilateral, isosceles, or scalene based on
side lengths.
PROGRAM CODE:
PROGRAM CODE:
18
PROGRAM #15
PROBLEM STATEMENT:
Write a Python program to check if a character is a vowel or a consonant.
PROGRAM CODE:
OUTPUT
(ALL OPTIONS):
19
PRO
GRAM #16
PROBLEM STATEMENT:
Write a Python program to determine the quadrant in which a given point lies in a
Cartesian coordinate system.
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
20
PROGRAM #17
PROBLEM STATEMENT:
Write a Python program to calculate the discounted price of an item based on the
original price and discount percentage
.PROGRAM CODE:
21
OUTPUT (ALL OPTIONS):
PROGRAM #18
PROBLEM STATEMENT:
Write a Python program to check if a given number is divisible by both 5 and 7.
PROGRAM CODE:
22
OUTPUT (ALL OPTIONS):
PROGRAM #19
PROBLEM STATEMENT:
Write a Python program to determine the type of a triangle based on its angles (e.g.,
acute, obtuse, or right
PROGRAM CODE:
23
OUTPUT (ALL OPTIONS):
PROGRAM #20
PROBLEM STATEMENT:
Write a Python program to calculate the area of a triangle using the base and height
provided.
PROGRAM CODE:
PROGRAM #21
PROBLEM STATEMENT:
Write a Python program to determine the day of the week based on a given number (1 for Monday, 2 for
Tuesday, etc.).
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
PROGRAM #22
PROBLEM STATEMENT:
Write a Python program to check if a given year is a century year (e.g., 1900, 2000,
PROGRAM #23
PROBLEM STATEMENT:
Write a Python program to determine the largest among four given numbers.
PROGRAM CODE:
PROGRAM #25
PROBLEM STATEMENT:
Write a Python program to determine the discount percentage based on the total purchase amount (e.g.,
10% off for $100 or more).
PROGRAM CODE:
PROGRAM #26
PROBLEM STATEMENT:
Write a Python program to check if a given point lies inside a circle with a given center and
PROGRAM #27
PROBLEM STATEMENT:
Write a Python program that calculates the income tax for an individual based on their annual salary. The
tax calculation should consider the following tax rate structure:
● Income up to $10,000: No tax
● Income from $10,001 to $30,000: 10% tax
● Income from $30,001 to $70,000: 20% tax
● Income above $70,000: 30% tax
PROGRAM CODE:
OUTPUT (ALL OPTIONS):
PROGRAM #28
Write a Program to Count the Number of Vowels in a String.
PROGRAM #30
1. WAP to input names of n students and store them in a tuple. Also, input a name from the user and find
if this student is present in the tuple or not.
PROGRAM #35
WAP, menu-driven to implement the following options
a. Copy all those records having AreaCode as “123” from TELEPHONE to TELEBACK dictionary. b.
Display contents of TELEPHONE dictionary. c. Delete a record from the TELEPHONE dictionary for an
AreaCode given by the user. d. Display contents of TELEBACK dictionary.
WAP, menu-driven:
a) Add a new bank customer
b) Deposit money for specific customer c)
Withdraw money for a specific customer
d) Display all Bank Data
e) Display specific customer information
OUTPUT:
PROGRAM #38
WAP to find the number of times an element occurs in the list.
PROGRAM CODE AND OUTPUT:
PROGRAM #39
WAP to read a list of n integers. Create two new lists, one having all +VE numbers and the other having all -VE
numbers from the given list. Print all three lists.
PROGRAM #46
9. Read a list of n elements.WAP which reverses this list in-place without creating a new list.
PROGRAM #51
Write a Program to Calculate the Number of Words and the Number of Characters Present a
String
PROGRAM #59
Write a Program to Check if a Substring is Present in a Given String
PROGRAM #62
Write a Python Program to Remove Last Occurrence of a Character in a String
PROGRAM CODE AND OUTPUT:
Case Study #1
A bank is a financial institution which is involved in borrowing and lending of money. With advancement in
technology, online banking, also known as internet banking allows customers of a bank to conduct a range of
financial transactions through the bank's website anytime, anywhere. As part of initial investigation you are suggested
to
collect a bank's application form. After careful analysis of the form, identify the information required for opening a
savings account. Also enquire about the rate of interest offered for a saving account.
The basic two operations performed on an account are Deposit and Withdrawal. Write a menu driven program that
accepts either of the two choices of Deposit and Withdrawal, then accepts an amount, performs the transactionand
accordingly displays the balance.Remember, every bank has a requirement of minimum balance which needs to be
taken care of during withdrawal operations. Enquire about the minimum balance required in your bank.
Collect the interest rates for opening a fixed deposit in various slabs in a savings bank account. Remember, rates may
be different for senior citizens.
Finally, write a menu driven program having the following options (use functions and appropriate data
Deposit money
Withdraw money
Take details, such as amount and period for a Fixed Deposit and display its maturity amount for a particular customer.
PROGRAM CODE AND OUTPUT: