[go: up one dir, main page]

0% found this document useful (0 votes)
15 views49 pages

CSS record work_merged

Uploaded by

Aaron Sudhir
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)
15 views49 pages

CSS record work_merged

Uploaded by

Aaron Sudhir
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/ 49

COMPUTER SCIENCE-

083
PRACTICAL RECORD WORK
2023-2024

Submitted By:
Aaron Sudhir
CBSE
PRACTICAL RECORD
2023 - 2024

Name: …AARON SUDHIR …………………………………………………………….

GR. No.:…………………8938………………………………………Grade ………………11 A……………………………


COMPUTER SCIENCE PRACTICAL RECORD 23-24

COMPUTER SCIENCE PRACTICAL RECORD

Grade……………11 A…………………………………..

Roll No. ……………03…………………………………

Certified to be the bonafide record of the work done by

Master/Miss ………AARON SUDHIR…………………...... in the School laboratory

during the academic year 2023- 2024

Signature of the Principal Teacher In charge

Submitted for the Practical Examination on …………..… 2024………. held in the

Crescent English High School, Dubai

Dubai

1. …………………………………….

…………/………./20………. 2. …………………………………….

External Examiners

Department Of Computer Science, CEHS Dubai


COMPUTER SCIENCE PRACTICAL RECORD 23-24

INDEX
Page Sign. Of
Sl.no. Date Name of the experiments
no. teacher

1 8/05/2023 To implement all mathematical


calculations
15/05/2023
2 To find the area and the perimeter of
a rectangle
22/05/2023 To find the area of a circle
3

29/05/2023
4 To find simple interest
19/06/2023
5 To convert distance of kilometer to
meter
26/06/2023
6 To convert Celsius to Fahrenheit
04/09/2023
7 To find the smallest of two numbers
07/09/2023 To check whether the number is even
8
or not
12/09/2023
9 To check whether the year is a leap
year or not
15/09/2023
10 To find he biggest of three numbers
19/09/2023
11 To check whether the number is a
multiple of 5
19/09/2023
12 To check whether the angle is obtuse
or right angle
22/09/2023
13 To print the 12 months of the year
22/09/2023 To check whether a character is a
14
vowel or not
26/09/2023
15 To print the details of student
26/09/2023
16 To write a menu driven program
29/09/2023 Write a program to determine the
17 nature and root of the quadratic
equation

Department Of Computer Science, CEHS Dubai


COMPUTER SCIENCE PRACTICAL RECORD 23-24

29/09/2023
18 To print the fisrt N narutal numbers
03/10/2023 To print the first N even numbers In
19
reverse order
03/10/2023 To print the sum of N natural
20
numbers
06/10/2023 To check whether the number is
21
Armstrong or not
06/10/2023 To check whether the number is
22
palindrome or not

INDEX
Page Sign. Of
Sl.no. Date Name of the experiments
no. teacher
23 10/10/2023 To print first N prime number
24 10/10/2023 To print N Fibonacci sequence
13/10/2023 To print the multiplication table of a
25
given number
13/10/2023
26 To convert binary into decimal
17/10/2023 To find the factorial of a given
27
number
17/10/2023 To find the factorial of a given
28
number
20/10/2023
29 To find the HCF of two numbers
20/10/2023
30 To print the following pattern(a)
To print the following pattern(b)
To print the following pattern(c)
To print the following pattern(d)

To print the following pattern(e)

To print the following pattern(f)

To print the following pattern(g)

Department Of Computer Science, CEHS Dubai


COMPUTER SCIENCE PRACTICAL RECORD 23-24

Department Of Computer Science, CEHS Dubai


Python Program -1

Aim: To implement all mathematical calculations


Source Code :
n=int(input("Enter First Value"))
m=int(input("Enter Second Value"))
print("~~~~~~All The Mathematical Functions Of The
Following Values Are~~~~~~~")
a=n+m
b=n-m
c=n*m
d=n/m
print("The Sum Of The Two Values Are",a)
print("The Difference Of The Two Values Are",b)
print("The Product Of The Two Values Are",c)
print("The Quotient Of The Two Values Are",d)

Output :
Python Program-2

Aim: To find the area and the perimeter of a rectangle


Source Code :
print("~~~~PERIMETER AND AREA OF A RECTANGLE~~~~")
l=int(input("Enter The Length Of The Rectangle"))
b=int(input("Enter The Breadth Of The Rectangle"))
a=l*b
print("The Area Of The Rectangle Is:",a)
p=2*(l+b)
print("The Perimeter Of The Rectangle Is:",p)

Output :
Python Program-3

Aim: To find the area of the circle


Source Code :
print("~~~~Area Of A Circle~~~~")
r=int(input("Enter The Radius Of The Circle"))
a=2*3.14*r*r
print("The Area Of The Circle Is:",a)

Output :
Python Program-4

Aim: To find simple interest


Source Code :
print("~~~~Simple Interest Finder~~~~")
p=int(input("Enter The Principal Amount"))
i=int(input("Enter The Interst Rate"))
t=int(input("Enter The Time Period"))
s=p*i*t/100
print("The Simple Interst Is:",s)

Output :
Python Program-5

Aim: To convert distance of kilometer to meter


Source Code :
print("~~~~Kilometer To Meter Converter~~~~")
n=int(input("Enter The Value"))
m=n*1000
print("The Value Converted Into Meter Is:",m)

Output :
Python Program-6

Aim: To convert Celsius to Fahrenheit


Source Code :
print("~~~~Celsius To Fahrenheit Converter~~~~")
c=int(input("Enter the Value"))
f=(c*(9/5))+32
print("The Entered Value Converted To Fahrenheit
Is:",f)

Output :
Python Program-7

Aim: To find the smallest of two numbers


Source Code :
print("~~~~To Find The Smallest Of Two Numbers~~~~")
a=int(input("Enter First Number"))
b=int(input("Enter Second Number"))
if a>b:
print(b,"Is The Smallest Number")
else:
print(a,"Is The Smallest Number")

Output :
Python Program-8

Aim: To check whether the even or not


Source Code:
print("~~~~To Check Whether The Number Is Even Or
Odd~~~~")
a=int(input("Enter A Number"))
r=a%2
if r==0:
print(a,"Is An Even Number")
else:
print(a,"Is An Odd Number")

Output:
Python Program-9

Aim: To check whether the year is a leap year or not


Source Code:
print("~~~~To Check Whether The Year Is A Leap Year Or
Not~~~~")
y=int(input("Enter The Year"))
l=y%4
if l==0:
print(y,"Is A Leap Year")
else:
print(y,"Is Not A Leap Year")

Output:
Python Program-10

Aim: To find the biggest of three numbers


Source Code:
print("~~~~To Find The Biggest Of Three Numbers~~~~")
a=int(input("Enter The First Number"))
b=int(input("Enter The Second Number"))
c=int(input("Enter The Third Number"))
if a>b and a>c:
print(a,"Is the biggest number")
elif b>a and b>c:
print(b,"Is the biggest number")
else:
print(c,"Is the biggest number")

Output:
Python Program-11

Aim: To check whether the number is a multiple of 5


Source Code:
print("~~~~To Check Whether The Number Is A Multiple
Of 5~~~~")
n=int(input("Enter A Value"))
r=n%5
if r==0:
print(n,"Is a multiple of 5")
else:
print(n,"Is not a multiple of 5")

Output:
Python Program-12

Aim: To check whether the angle is obtuse or right angle


Source Code:
print("~~~~To Check Whether The Angle Is An Obtuse Or
Right Angle~~~~")
a=int(input("Enter The Value Of The Angle"))
if a>90:
print(a,"Is an obtuse angle")
elif a==90:
print(a,"Is a right angle")

Output:
Python Program-13

Aim: To print the 12 months of the year


Source Code:
print("~~~~To Print The 12 Months Of The Year~~~~")
y=int(input("Enter A Number Between 1 And 12"))
if y==1:
print("January")
elif y==2:
print("February")
elif y==3:
print("March")
elif y==4:
print("April")
elif y==5:
print("May")
elif y==6:
print("June")
elif y==7:
print("July")
elif y==8:
print("Agust")
elif y==9:
print("September")
elif y==10:
print("October")
elif y==11:
print("November")
elif y==12:
print("December")

Output:
Python Program-14

Aim: To check whether a character is a vowel or not


Source Code:
print("~~~~To Check Whether The Character Is A Vowel Or
Not~~~~")
c = input("Enter a character: ")

if(c=='A' or c=='a' or c=='E' or c =='e' or c=='I'


or c=='i' or c=='O' or c=='o' or c=='U' or c=='u'):
print(c, "is a Vowel")
else:
print(c, "is a Consonant")

Output:
Python Program-15

Aim: To print the details of a student


Source Code:
g=input("Enter the gr.number of the student")
n=input("Enter the name of the student")
c=input("Enter the class of the student")
m=int(input("Enter maths mark of the student"))
e=int(input("Enter english marks of the student"))
s=int(input("Enter social science marks of the
student"))
si=int(input("Enter science marks of the student"))
l=int(input("Enter language marks of the student"))
tm=m+e+s+si+l
avg=tm/5
print("~~~The mark grading of the student~~~")
print("The total mark of the student is",tm)
print("The average mark of the student is",avg)
if avg>90:
print("The mark grading is A1")
elif avg>80 and avg<=90:
print("The mark grading is A2")
elif avg>70 and avg<=80:
print("The mark grading is B1")
elif avg>60 and avg<=70:
print("The mark grading is B2")
else:
print("The student has failed")

Output:
Program – 16

Aim: To write a menu driven program


Source code:
print("~~~~To write a menu driven program~~~~")
m=int(input("Enter the First value:"))
n=int(input("Enter the Second value:"))
print("Type any of the following choices: add, sub,
multi, div")
a=input()
if a =="ADD" or a=="Add" or a=="add":
b=n+m
print(b,"is the sum of the following numbers")
elif a=="SUB" or a=="Sub" or a=="sub":
c=n-m
print(c,"is the difference of the following
numbers")
elif a=="MULTI" or a=="Multi" or a=="multi":
d=n*m
print(d,"is the product of the follwing numbers")
elif a=="DIV" or a=="Div" or a=="div":
e=n/m
print(e,"is the division of the following numbers")
else:
print("The entered value is unavailable")
Output:
Program – 17

Aim: Write a program to determine the nature and the root of quadratic equation
Source Code:
print("~~~~To write a program to determine the nature
and he root of the quadratic equation~~~~")
from math import sqrt
print("The basic form of a quadratic equation is
ax^2+bx+c=0")
a=int(input("Enter the value for the first variable:"))
b=int(input("Enter the value for the second
variable:"))
c=int(input("Enter the value for the third variable:"))

d=(b**2)-(4*a*c)
if d>0:
print("The nature of the roots is real and
unequal")
num_roots=2
x1=(((-b)+sqrt(d)/2*a))
x2=(((-b)-sqrt(d)/2*a))
print("There are two roots :%f and %f" % (x1,x2))
elif d==0:
print("The roots are real and equal")
num_roots=1
x=(-b)/2*a
print("There is only one root:",x)
else:
num_roots=0
print("No roots and the discriminant is >0")
Output:
Program – 18

Aim: To print first N natural numbers


Source Code:
print("~~~~To print the first N natural numbers~~~~")
m=int(input("Enter the limit:"))
for i in range(1,m+1):
print(i,end=' ')
Output:
Program – 19

Aim: To print first N even numbers in reverse order


Source Code:
print("To print the first N even numbers in the reverse
order")
m=int(input("Enter the limit:"))
r=2%m
for i in range(m,0,-r):
print(i)
Output:
Program – 20

Aim: To print the sum of N natural numbers


Source Code:
print("~~~~To print the sum of N natural numbers~~~~")
m=int(input("Enter the limit:"))
s=0
while m>0:
s=s+m
m=m-1
print(s)
Output:
Program – 21
Aim: To check whether the number is armstrong or not
Source Code:
print("~~~~To check whether the given number is
armstrong or not~~~~")
m=int(input("Enter the number:"))
s=0
t=m
while t>0:
d=t%10
s+=d*d*d
t=t//10
if s==m:
print("The entered number is armstrong")
else:
print("The entered number is not armstrong")
Output:
Program – 22

Aim: To check whether the number is palindrome or not


Source Code:
print("~~~~To check whether the number is palindrome or
not~~~~")
m=int(input("Enter the number:"))
t=m
l=0
while m>0:
r=m%10
l=l*10+r
m=m//10
if t==l:
print("The entered number is palindrome")
else:
print("The entered number is not palindrome")
Output:
Program – 23

Aim: To print first N prime numbers


Source Code:
print("~~~~To print the first N prime numbers~~~~")
n=int(input("Enter the limit:"))
m=1
for a in range (m, n+1):
if a > 1:
for i in range (2, int(a**0.5)+1):
if a%i==0:
break
else:
print(a,end=' ')
Output:
Program – 24

Aim: To print N Fibonacci sequence


Source Code:
print("~~~~To print N fibonacci sequence~~~~")
n=int(input("Enter the limit:"))
f1,f2=0,1
print("Fibonacci sequence:", f1,f2, end=' ')
for i in range(2,n):
f3=f1+f2
f1=f2
f2=f3
print(f3,end=' ')
print()
Output:
Program – 25

Aim: To print the multiplication table of a given number


Source Code:
print("~~~~To print the multiplication table of a given
number~~~~")
z=int(input("Enter the table:"))
n=int(input("Enter the starting number:"))
m=int(input("Enter the limit:"))
while n<=m:
print(n,"*",z,"=",n*z)
n=n+1
Output:
Program – 26

Aim: To convert binary into decimal


Source Code:
print("~~~~To convert binary into deciaml~~~~")
bn=input("Enter the binary number:")
dn=0
m=1

for i in bn:
i=int(i)
dn=dn+(i*m)
m=m*2
print ("The deciaml value for the follwing is =",dn)
Output:
Program – 27:

Aim: To find the factorial of a given number


Source Code:
print("~~~~To print the factorail of a given
nubmer~~~~")
n=int(input("Enter a number:"))
f=1

#if loop statement is starting


if n>=f:
for i in range (1,n+1):
f=f*i
print("The factorial of the given number is :",f)
Output:
Program – 28:

Aim: To check whether the number is a buzz number or not


Source Code:
print("~~~~To check whether the given number is a buzz
number or not~~~~")
print("A buzz number is a number that ethier ends with
7 or is divisible by 7")
n=int(input("Enter a number:"))
m=7
z=n%10
if n%m==0:
print("The number is a buzz number")
elif z==7:
print("The number is a buzz number")
else:
print("The number is not a buzz number")
Output:
Program – 29:

Aim:To find the HCF of two numbers


Source Code:
print("~~~~To calculate the HCF of two numbers~~~~")
n=int(input("Enter a number:"))
m=int(input("Enter another number:"))
t1=n
t2=m
while n!=m:
if n>m:
n
n=n-m
else:
m=m-n
print("The hcf of ",t1,"and",t2,"=",n)
Output:
Program – 30(a)

Aim:To print the following pattern


*
**
***
****
*****
Source Code:
print("To display the following pattern (a)")
for i in range (1,6):
for j in range (1,i+1):
print("*",end='')
print()
Output:
Program-30(b)

Aim: To display the following pattern


1
22
333
4444
55555
Source Code:
print("To display the follwing pattern (b)")
for i in range (1,6):
for j in range (1,i+1):
print(i, end=' ')
print()
Output:
Program -30(c)

Aim: To display the following pattern


1
12
123
1234
12345
Source Code:
print("To display the follwing pattern (c)")
for i in range (1,6):
for j in range(1,i+1):
print(j, end= ' ')
print()
Output:
Program -30(d)

Aim: To print the following pattern


1
35
579
7 9 11 13
Source Code:
print("~~~~To display the follwing pattern (d)~~~~")
n=int(input("Enter the limit:"))
for i in range (1,n+1,2):
for j in range(1,i+1,2):
print(i,end=' ')
i=i+2
print()
Output:
Program-30(e)

Aim: To print the following patterns


12345
1234
123
12
1
Source Code:
print("~~~~To print the following pattern(e)~~~~")
n = int(input("Enter a vlue"))
i=1

while i <= n:
j=1
while j <= n-i+1:
print(j,end =' ')
j=j+1
print()
i=i+1
Output:
Program-30(f)

Aim: To print the following patterns


1
10
101
1010
Source Code:
print("~~~~To print the folling pattern(f)~~~~")
n = int(input("Enter number of lines of pattern: "))

for i in range(1,n+1):
for j in range(1, i+1):
print(j%2, end="")
print()
Output:
Program -30(g)

Aim: To print the following pattern


1111
2222
3333
4444
Source Code:
print("~~~~To print the follwing pattern(g)~~~~")
for i in range(1,5):
for j in range(4):
print(i,end="")
print(" ")
Output:

You might also like