0% found this document useful (0 votes)
5 views24 pages

Pankajip 1

The document certifies that Pankaj Rajpurohit, a student of class XI commerce at Shree Swaminarayan English Medium School, has completed his practical work for Informatics Practices under supervision. It includes an introduction, acknowledgment, and an index of various Python programming tasks completed by the student. The document contains code snippets and outputs for each programming task, demonstrating practical knowledge in programming.

Uploaded by

ayushqwe902
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)
5 views24 pages

Pankajip 1

The document certifies that Pankaj Rajpurohit, a student of class XI commerce at Shree Swaminarayan English Medium School, has completed his practical work for Informatics Practices under supervision. It includes an introduction, acknowledgment, and an index of various Python programming tasks completed by the student. The document contains code snippets and outputs for each programming task, demonstrating practical knowledge in programming.

Uploaded by

ayushqwe902
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/ 24

SHREE SWAMINARAYAN ENGLISH MEDIUM SCHOOL (CBSE) SALVAV,VAPI

CERTIFICATE
This is to certify that Ms./Mr Pankaj Rajpurohit
roll number 31 student of class XI commerce from
SHREE SWAMINARAYAN GURUKUL,SALVAV has

successfully completed his practical work for


academic session 2024-25 under my supervision
for Informatics practices (065)practical
examination.

Teacher in-charge School Seal


1
INTRODUCTION

NAME : Pankaj Rajpurohit

CLASS : XI commerce

SUBJECT : Informatics Practices

SCHOOL: Shree Swaminarayan English Med. CBSE school Salvav

SUBMITTED TO : Deepika pardeshi

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.

2. Write a program to input a value in tonnes and convert it into


quintals and kilograms.
3. Write a program to input a welcome message and print it.

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.

10. Program to print sum of natural numbers between 1 to 7.

11. Program to illustrate a nested for loop.

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.

15. Write a program to find the largest/smallest value of asset in a


given list
of assets of a company. 5
16. Create the following lists using a for loop
1. A list consisting of the integers 0 and 49.
2. A list containing the squares of the integers 1 through 50.
3. The list [‘a’,’bb’,’ccc’,’dddd’,…..] that ends with 26 copies of the
letter z.

6
1 Write a program to input a number and print its cube. Code:

'''num = int(input("Enter a number:"))


cube = num * num * num
print("Number is ", num)
print("Its cube is", cube)'''
Output
2 Write a program to input a value in tonnes and convert it into quintals and
kilograms.
Code:
(1 tonne = 10 quintals, 1 tons = 100kgs, 1 quintals = 100kgs)
Solution:

'''tonnes = float(input("Enter tonnes:"))


quintals = tonnes * 10
kgs = quintals * 100
print("Tonnes:", tonnes)
print("Quintals:", quintals)
print("Kilograms:", kgs)'''
Output
3 Write a program to input a welcome message and print it.
Code:

'''message = input("Enter welcome message:")


print()
print("Hello,", message)'''
Output
4 Write a program to find sale price of an item with given price and
discount(%).
Code:

'''price = float(input("Enter price:"))


dp = float(input("Enter discount%:"))

discount = price * dp / 100


sp = price - discount
print("Cost price =", price)
print("Discount =", discount)
print("Selling Price", sp)'''
output
5 Write a program to Calculate Compound interest. Code:
'''import math
print= float(input("Principal Amount:"))
rate = float(input("Rate Of Interest :"))
time = float(input("Time(in years) :"))

# 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:

'''P = float(input("Enter money lent:"))


R = float(input("Enter rate of interest:"))
T = float(input("Enter time in years:"))
SI = (P * R * T)/ 100
amount_payable = P +SI
print("Amount payable is : Rs.", amount_payable)'''
Output
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:
Code:

'''weight_in_kg = float(input("Enter weight in kg:"))


height_in_meter = float(input("Enter height in meters:"))
bmi = weight_in_kg / (height_in_meter * height_in_meter)
print("BMI is :", bmi, end ="")
if bmi < 18.5:
print("...Underweight")
elif bmi < 25:
print("...Normal")
elif bmi < 30:
print("...Overweight")
else:
print("...Obese")'''
Output
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).
Code:

'''name = input("Enter name:")


age = int(input("Enter age:"))
if age >=18:
print(name, "is eligible for a driving license.")
else:
print(name, "is not eligible for a driving license.")'''
output:
09 Program to print table of a number, say 5. 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:

'''for outer in range(5, 10, 4):


for inner in range(1, outer, 2): print(outer, inner)'''
Output:
12 Write a program that inputs a list, replicates it twice and then prints the sorted
list in ascending and descending orders.
Code:

'''val = eval(input("Enter a list"))


print("Original list:", val)
val = val * 2
print("Replicated list:", val)
8val.sort()
print("Sorted in ascending order:", val)
val.sort(reverse = True)
print("Sorted in descending order:", val)'''
Output:
13 Program to find the minimum element from a list of element along
with its index in the list.
Code:

'''lst = eval(input("Enter list:"))


length = len(lst)
min_ele = lst[0]
min_index = 0
for i in range(1, length):
if lst[i] < min_ele:
min_ele = lst[i]
min_index = i
print("Given list is:", lst)
print("The minimum element of the given list is:")
print(min_ele,"at index", min_index)'''
Output:
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.
Code:

'''lst1 = eval(input("Enter list1:"))


lst2 = eval(input("Enter lst2:"))
mx1 = max(lst1)
mx2 = max(lst2)
if mx1 >= mx2:
print(mx1,"the maximum value is in list1 at index", lst1.index(mx1))
else:
print(mx2,"the maximum value is in list2 at index", lst2.index(mx2))'''
Output:
15 Write a program to find the largest/smallest value of asset in a given
list of assets of a company.
Code:

'''val = eval(input("Enter list of assets:"))


print("The list is:", val)
mx = max(val)
mn = min(val)
print("Biggest Assets:", mx)
print("Smallest Assets:", mn)'''
Output:
16 Create the following lists using a for loop
1. A list consisting of the integers 0 and 49.

Code:

'''l = []

for i in range(50):
l.append(i)

print("List with integers from 0 to 49:")


print(l)'''
Output:
2. A list containing the squares of the integers 1 through 50.
Code:

'''l = []

for i in range(1, 51):


l.append(i * i)
Output:

print("List with square of integers 1 to 50:")


print(l)'''
3 .The list [‘a’,’bb’,’ccc’,’dddd’,…..] that ends with 26 copies of the letter z.
Code:

'''l = []

for i in range(1, 27):


l.append(chr(i + 96) * i)

print("Created List:")
print(l)'''
Output:

You might also like