You are on page 1of 15

COMPUTER SCIENCE

PRACTICAL RECORD FILE

SUBMITTED BY:

NAME: YUSUF SAHEEL RHOOF


CLASS: 11-A
Academic Year: 2023-2024
CERTIFICATE

CBSE Board Roll No:………………..

This is to Certify that, Master …


……………. of Grade 11, Sec. … has carried out the Project Work-
Title:………………………………../ Record File Programs in Computer
Science as prescribed by the Central Board of Secondary
Education, New Delhi during the Academic Year, 2023 – 2024.

Teacher-In Charge : Mr. Yadav Janardan Singh

Date :

Internal Examiner External Examiner

INDEX
EXP. TITLE OF PROGRAM Sign REMARKS
NO.
1 Write a program to input a multi-digit number and find
the sum of digits of an integer number.

2 Write a program to input a multi-digit number and find


the reversed number. Display the reversed number.
Check whether the given number is a palindrome.

3 Program to print pattern using nested for loops:


12345
1234
123
12
1

4 Program to print pattern using nested for loops:


1
121
12321
1234321
123454321

5 Program to print pattern using nested for loops:


1
121
12321
1234321
12321
121
1

6 Write a program to input the value of x and n and print


the sum of the following series:
⮚1+𝑥+𝑥2+𝑥3+𝑥4+⋯𝑥n

7 Determine whether a number is a perfect number, an


Armstrong number or a palindrome.

8 Input a number and check if the number is a prime or


composite number.

9 Display N terms of a Fibonacci series. (where n is a


positive number)
10 Compute the greatest common divisor and least .
common multiple of two integers. (gcd/ HCF and LCM)

11 Count and display the number of vowels, consonants,


uppercase, lowercase characters in string.

12 Input a string and determine whether it is a


palindrome or not.

13 Input a string and convert the case of characters in a


string. (Uppercase to lowercase and vice-versa)
Program 10-
Aim: To find HCF and LCM of two numbers.
Program:
num1 = int(input('Enter a number: '))
num2 = int(input('Enter a number: '))
for i in range(1,num1):
if num1%i ==0 and num2%i ==0:
hcf = i
print('hcf is',hcf)
lcm = (num1*num2)//hcf
print('lcm is',lcm)
Output:
Enter a number: 24
Enter a number: 6
hcf is 6
lcm is 24
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Program 1 –
Aim : To find the sum of the digits of a number.
Program :
num = int(input('Enter a number: '))
q = num
sum1 = 0
while q !=0:
f = q%10
sum1+=f
q =q//10
print("The sum of the number",num,"is",sum1)
Output :
Enter a number: 12345
The sum of the number 12345 is 15
Program 2 –
Aim : To find whether a number is a palindrome or not.
Program :
num = int(input('Enter a number to find if its a palindrome: '))
rev = 0
count =0
q = num
while q >0:
digit = q%10
rev =rev*10+digit
q //=10
count +=1
print(count)
Output :
Enter a number to find if its a palindrome: 343
The number is a palindrome
Program 8 –
Aim : To find whether a number is prime or composite.
Program :
num = int(input('Enter a number to find whether its prime or
composite: '))
if num ==1 or num ==0:
print('1 and 0 are neither prime nor composite')
elif num>1:
for i in range(2,num):
if i<=num//2:
if num%i ==0:
print('composite')
break
else:
print('prime')
Output :
Enter a number to find whether its prime or composite: 11
prime
Program 17-
Aim : To print the pattern –
A
AB
A B C ..
Program :
num = int(input('Enter a number: '))
for i in range(65,65+num):
for j in range(65,i+1):
print(chr(j), end = ' ')
print()
Output :
Enter a number: 7
A
AB
ABC
ABCD
ABCDE
ABCDEF
ABCDEFG

You might also like