Professional Documents
Culture Documents
B.lakshya11aip Pba-1
B.lakshya11aip Pba-1
B.lakshya11aip Pba-1
B.lakshya
11a
Q1:Problem:
This is a Python Program to take in the marks of 5 subjects and display the
grade.
Problem Description
The program takes in the marks of 5 subjects and displays the grade
Input
Output
Enter marks of the first subject: 85
Enter marks of the second subject: 95
Enter marks of the third subject: 99
Enter marks of the fourth subject: 93
Enter marks of the fifth subject: 100
Q2. Program: To find sale price of an item with given cost and discount (5%)
Input same amount and calculate discount based on the amount and
Given discount rate in Python.
The discount rates are:
Amount Discount
0-5000 5%
5000-15000 12%
15000-25000 20%
above 25000 30%
Input
Output
Enter Sale Amount: 30000
Discount : 9000.0
Net Pay : 21000.0
Q3:
To calculate perimeter/circumference and area of shapes such as
triangle, rectangle, square and circle in python
Input
output
Q4. Python Program to Calculate Profit or Loss
input
output
Profit of 150.0
Loss of 121.0
input
Output
P = 10000
R = 5
T = 5
Output :2500.0
Q6. This Python program calculates an equated monthly installment(EMI)
input
output
Enter principal amount: 25000
Q9:Create a list of your choice show append and extend method list of numbers
input&output
10.Create a list of your choice perform following operations:
Deleting elements using remove(), pop() and clear() methods
remove(item): Removes specified item from list.
pop(index): Removes the element from the given index
Input & output
Q8:You have a list a = [1, 2, [3, 4], 5]. Now answer the following. Verify
your answers in Python Shell.
(a)What is the length of a? (f)What does a [-1 * len(a)] evaluate to?
=4 Output:- 1
=3 integer
It gives error.
(f)
Thank
you:)