0% found this document useful (0 votes)
23 views17 pages

10 Program List For Record File

Uploaded by

namita8307rai
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)
23 views17 pages

10 Program List For Record File

Uploaded by

namita8307rai
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/ 17

Note: Given practical work is to be done on loose sheets (one side blank-output,

one side ruler- coding) and then will be filed in folder.

PRACTICAL-1

#Aim:- A program to find out of Area and Circumference of a circle


#Done by: Your Name
#Mentor : Dhananjay Kumar Singh

r=float(input('Enter the radius :- '))


pie=22/7
Area=pie*r**2
C=2*pie*r
print(" The Area of circle is:", Area, "and the Circumference of circle is", C)

Sample Output:

Enter the radius :- 14


The Area of circle is: 616.0 and the Circumference of circle is 88.0
PRACTICAL-2

#Aim:- A program to find out of the Simple Interest


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

p=float(input('Enter the Principal Amount :- '))


r=float(input('Enter the rate of interest :- '))
t=float(input('Enter the time in years :- '))
si=(p*r*t)/100
print('Simple Interest = ',si)

Sample Output:
Enter the principal:- 1200
Enter the rate of interest :- 10
Enter the time in years :- 2
Simple Interest = 240.0
PRACTICAL-3
#Aim:- A program to find out of Profit and Profit Percentage.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

cp=int(input('Enter the Cost Price :- '))


sp=int(input('Enter the Selling Price :- '))
p=sp-cp
pp=p/cp*100
print(" The Profit is:", p , "and the Profit Percent is ",pp)

Sample Output:

Enter the Cost Price :- 400


Enter the Selling Price :- 500
The Profit is: 100 and the Profit Percent is 25.0
PRACTICAL-4

#Aim:- A program to find out total and average of 5 subject’s marks


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

e=float(input('Enter English marks out of 100:'))


h=float(input('Enter Hindi marks out of 100:'))
m=float(input('Enter Maths marks out of 100:'))
sc=float(input('Enter Science marks out of 100:'))
ssc=float(input('Enter Social Science marks out of 100:'))
tot=e+h+m+sc+ssc
per=(tot/500)*100
print('Total Marks =',tot)
print('Percentage Marks =',per)

Sample Output:
Enter English marks out of 100:56
Enter Hindi marks out of 100:78
Enter Maths marks out of 100:45
Enter Science marks out of 100:89
Enter Social Science marks out of 100:76
Total Marks = 344.0
Percentage Marks = 68.8
PRACTICAL-5

#Aim:- A program to convert temperature given in


Celsius into Fahrenheit.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

cel=float(input('Enter temperature in degree Celsius :--'))


F=(9/5)*cel+32
print('Fahrenheit Temperature is ',F)

Sample Output:
Enter temperature in degree celsius:--98.4
Fahrenheit Temperature is 209.12
PRACTICAL-6

#Aim:- A program to find the Final Velocity


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

u=float(input('Enter the Initial Velocity :- '))


a=float(input('Enter the Acceleration :- '))
t=float(input('Enter the Time in Sec :- '))

v = u + a* t
print(" The Final Velocity is ", v)

Sample Output:
Enter the Initial Velocity :- 45
Enter the Acceleration :- 2
Enter the Time in Sec :- 45
The Final Velocity is 135.0
PRACTICAL-7

#Aim:- A program to find the total run scored by a player


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

s=int(input('Enter the no. of sixes :- '))


f=int(input('Enter the no. of fours :- '))
th=int(input('Enter the no. of three’s :- '))
t=int(input('Enter the no. of two’s :- '))
o=int(input('Enter the no. of one’s :- '))

tot_run = (s*6+f *4+th*3+t*2+o)


print(" The total run scored by a player is ", tot_run)

Sample Output:
Enter the no. of sixes :- 1
Enter the no. of fours :- 2
Enter the no. of three’s :- 3
Enter the no. of two’s :- 2
Enter the no. of one’s :- 2
The total run scored by a player is 29
PRACTICAL-8

#Aim:- A program to accept height in centimeter and


convert it into Meter & Cm.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

h=int(input('Enter the height of a person in cm :- '))


m= h//100
cm= h%100
print(" The Height of a person is",m," m ", "and in centimeter is",cm,"cm")

Sample Output:
Enter the height of a person in cm :- 175
The Height of a person is 1 m and in centimeter is 75 cm
PRACTICAL-9

#Aim:- A program to find the Area and Perimeter of Rectangle


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

l=float(input('Enter the Length of a Rectangle :- '))


b=float(input('Enter the Breadth of a Rectangle :- '))
Area=l*b
Perimeter=2*(l+b)
print(" The Area of Rectangle is",Area, "and the Perimeter is:", Perimeter)

Sample Output:
Enter the Length of a Rectangle :- 20
Enter the Breadth of a Rectangle :- 30
The Area of Rectangle is 600.0 and the Perimeter is: 100.0
PRACTICAL-10

#Aim:- A program to calculate compound interest


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

p=float(input('Enter principle:--'))
r=float(input('Enter rate:--'))
t=float(input('Enter time:--'))
ci=(p*(1+(r/100))**t)-p
print('Compound Interest is ',ci)

Sample Output:

Enter principle:--2000
Enter rate:--10
Enter time:--3
Compound Interest is 662.0000000000009
PRACTICAL-11

#Aim:- Write a program to check whether the given number is Even or Odd.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

n=int(input('Enter the number:'))


if n % 2==0:
print( n, " is Even number")
else:
print ( n, " is Odd number")

Sample Output:
Enter the number: 45
45 is Odd number
PRACTICAL-12

#Aim:- Write a program to find largest among the three numbers.


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

num1=int(input("Enter first number: "))


num2=int(input("Enter second number: "))
num3=int(input("Enter third number: "))
if (num1 >= num2) and (num1 >= num3):
largest = num1
elif (num2 >= num1) and (num2 >= num3):
largest = num2
else:
largest = num3
print("The largest number between",num1,",",num2,"and",num3,"is",largest)
Sample Output:
Enter first number: 45
Enter second number: 76
Enter third number: 47
The largest number between 45 , 76 and 47 is 76
PRACTICAL-13

#Aim:- Write a program to check whether the given year is leap or not.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

n=int(input("Enter the year:"))


if (n%100!=0 and n % 4==0) or n%400==0:
print( n, " is a leap year ")
else:
print ( n, " is not a leap year")
Sample Output:
Enter the year:2076
2076 is a leap year

PRACTICAL-14
#Aim:- Write a program to display table of a given number.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

n=int(input('Enter the number for table:'))


for i in range(1,11):
print( n,"x",i,"=",n*i)

Sample Output:
Enter the number for table:5
5x1=5
5 x 2 = 10
5 x 3 = 15
5 x 4 = 20
5 x 5 = 25
5 x 6 = 30
5 x 7 = 35
5 x 8 = 40
5 x 9 = 45
5 x 10 = 50

PRACTICAL-15
#Aim:- Write a program to check whether the given number is prime or not.
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

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

if num == 1:
print(num, "is not a prime number")
elif num > 1:
# check for factors
for i in range(2,num):
if (num % i) == 0:
print(num,"is not a prime number")
print(i,"times",num//i,"is",num)
break
else:
print(num,"is a prime number")

else:
print(num,"is not a prime number")

Sample Output:
Enter a number: 23
23 is a prime number

#Aim:- Write a program to accept two no’s and find the HCF & LCM
#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

n1=int(input("Enter first number: "))


n2= int(input("Enter second number: "))
if n1==n2:
hcf=n1
else:
if n1<n2:
d=n1
else:
d=n2
while(d>0):
if n1%d==0 and n2%d==0:
hcf=d
break
d=d-1

lcm=(n1*n2)/hcf

print("HCF is :-",hcf)
print("LCM :-",lcm)

Sample Output:
Enter first number: 20
Enter second number: 8
HCF is :- 4
LCM :- 40.0

#Aim:- Write a program to check the given number is Palindrome or not


#Done by: Your Name
#Mentor: Dhananjay Kumar Singh

n=int(input("Enter number:"))
temp=n
rev=0
while(n>0):
dig=n%10
rev=rev*10+dig
n=n//10
if(temp==rev):
print("The number is a palindrome!")
else:
print("The number isn't a palindrome!")

Sample Output:
Enter number: 12321
The number is a palindrome

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy