Pankajip 1
Pankajip 1
CERTIFICATE
This is to certify that Ms./Mr Pankaj Rajpurohit
roll number 31 student of class XI commerce from
SHREE SWAMINARAYAN GURUKUL,SALVAV has
CLASS : XI commerce
3
ACKNOWLEDGEMENT
I would like to thank my teacher Mrs. Deepika pardeshi
and principal ma’am Mrs. Minal Desai for giving me the
opportunity to do this practical file. This also helped me in
doing a lot of research and increased my knowledge in
difficult topics.
4
INDEX
PYTHON PROGRAMS
Sr.No Questions Tr.Sign.
1. Write a program to input a number and print its cube.
4.
Write a program to find sale price of an item with given price
and discount(%).
5.
# Write a program to Calculate Compound interest.
6. Write a Python program to Calculate the amount payable if
money has been lent on simple interest.
7
Write a program to calculate BMI of a person after inputting its
weight in kgs and height in meters and then print the Nutrional
Status as per adjacent table:
8. Write a program that takes the name and age of the user as input
and
Displays a message whether the user is eligible to apply for a
driving license or
not (the eligible age is 18 years).
9. Program to print table of a number, say 5.
12. Write a program that inputs a list, replicates it twice and then
prints the sorted list
in ascending and descending orders.
13. Program to find the minimum element from a list of element along
with
its index in the list.
14.
Write a program to input two lists and display the maximum
element from the elements of both the lists combined, along with
its index in its list.
6
1 Write a program to input a number and print its cube. Code:
# si = (prin*rate*time)/100
amt = prin * (math.pow((1 + rate / 100), time))
ci = amt - prin
print("Compound interest is", ci)
#print("Simple Interest:", si)'''
Output
6 Write a Python program to Calculate the amount payable if money has been
lent on simple interest.
Principal or money lent = P, Rate of interest = R% per annum and Time = T
years.
Then simple interest (SI) = (P x R x T) / 100.
Amount payable = Principle + SI.
P, R and T are given as input to the program.
Code:
'''num = 5
for a in range(1, 11):
print(num,'x', a,'=', num * a)'''
Output:
10 Program to print sum of natural numbers between 1 to 7.
Code:
'''sum = 0
for n in range(1, 8):
sum += n
print("Sum of natural numbers <=", n,'is', sum)'''
Output:
11 Program to illustrate a nested for loop.
Code:
Code:
'''l = []
for i in range(50):
l.append(i)
'''l = []
'''l = []
print("Created List:")
print(l)'''
Output: