0% found this document useful (0 votes)
18 views

Computer Program ISC 2025 Suggestions

The document outlines the practical examination format for Class XII Computer Science at St. Stephen's School for the academic year 2024-25, consisting of three programming problems. Candidates must write algorithms, develop Java programs, and test them based on given tasks, including matrix manipulation, string analysis, and number generation. Each problem requires specific outputs and includes examples for clarity, with a total examination time of three hours including a planning session.

Uploaded by

nascarjeet00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Computer Program ISC 2025 Suggestions

The document outlines the practical examination format for Class XII Computer Science at St. Stephen's School for the academic year 2024-25, consisting of three programming problems. Candidates must write algorithms, develop Java programs, and test them based on given tasks, including matrix manipulation, string analysis, and number generation. Each problem requires specific outputs and includes examples for clarity, with a total examination time of three hours including a planning session.

Uploaded by

nascarjeet00
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

<br>

St.Stephen's Shool Aum Bum


COMPUTER SCIENCE
PREBOARDS EXAMINATION 2024-25
(PRACTICAL)
Class: XII
(Maximum Marks: 30)
(Time allowed: Three hours)
(Candidates are allowed additional 15 minutes for only reading the paper.
They must NOT start writing during this time.)

The total time to be spent on the Planning session and Examination session
is Three hours.
Planning session: 90 minutes
Examination session: 90 minutes
Note: Candidates are to be permitted to proceed to the Examination Session
only after the
90 minutes of the Planning Session are over.

This paper consists of three problems from which candidates are required to
attempt any one problem.
Candidates are expected to do the following:
1. Write an algorithm for the selected problem.

(Algorithm should be expressed clearly using any standard scheme such as pseudo

code or in steps which are simple enough to be obviously computable)


2. Write a program JAVA language. The program should follow the algorithm and
in

should be logically and syntactically correct. Document the program using mne
monic names /comments, identifying and clearly describing the choice of data
types and meaning of variables.
3. Code/Type the program on the computer and geta print out (Hard Copy).

Typically, this should be a program that compiles and runs correctly.


a
4. Test run the program on the computer using the given sample data and get print
out of the output in the format specified in the problem.
<br>

Question 1

Write a program to declare a matrix AI] of order (MxN) where 'M' is the number of
rows and N'is the number of columns such that both M and N must be greater than 2
and less than 20. Allow the user to input integers into this matrix. Perform the following
tasks on the matrix:
Perform the following tasks on the matrix.
(a) Display the input matrix.
(b)Find the maximum and minimum value in the matrix and display them along with
their position.
(c) Sort the elements of the matrix in descendingorder using any standard sorting
technique And rearrange them in the matrix.
(d) Output the rearranged matrix.
Test your program for the following data and some random data:
Example 1

INPUT: M=3 N=4

Enter elements of the matrix:


7
-2 4 5
1 3 -4 6
OUTPUT: ORIGINAL MATRIX
8 7 3

-2 4
1 3 6 -4
LARGEST NUMBER: 9
ROW = 0
COLUMN= 2

SMALLEST NUMBER: -4

ROW = 2
COLUMN =3

REARRANGED MATRIX
1
-4 -2 0
3 4 5
7 8 9
<br>

Example 2

INPUT: M=3
N3
Enter elements of the matrix:
7
-2 4
16 4

OUTPUT: ORIGINAL MATRIX

7 3
-2 4 5
16 4

LARGEST NUMBER: 16
ROW =2
COLUMN =1

SMALLEST NUMBER: -2
ROW =1
COLUMN= 0

REARRANGED MATRIX

-2 1
3

4 4 5
7 9 16

Example3

INPUT: M=3
N= 22

OUTPUT: SIZE OUT OF RANGE


<br>

Question 2
Write programto accept a sentence which may be terminated by either'" ?'or "
A

only. The words may be separated by a single blank space and should be case
insensitive. Perform the following tasks:
(a) Determine if the accepted sentence is a Pangram or not.
[A Pangram is a sentence that contains every letter of the alphabet at least once.]
Example: The quick brown fox jumps over the lazy dog"
(b) Display the first occurring longest and shortest word in the accepled sentence.

Test your program for the following data and some random data:
Example 1:
INPUT. Pack my box with five dozen liquor jugs.
OUTPUT:ITIS A
PANGRAM

LONGEST WORD: dozen


SHORTEST WORD. my
Example 2:
INPUT: THEQUICK BROWN FOXx JUMPS OVER THE LAZY DOG.

OUTPUT: IT IS A PANGRAM
LONGEST WORD: QUICK
SHORTEST WORD. THE
Example 3:
INPUT: Hello my World.

OUTPUT: IT IS NOT A PANGRAM


LONGEST WORD: Hello
SHORTEST WORD: my
:
Example 4
INPUT: Alas! it failed #

OUTPUT: INVALID INPUT


<br>

Question 3
A unique-digit integer is a positive integer (without leading zeros) with no duplicate
digits. For example, 7, 135, 214 are all unique-digit integers whereas 33, 3121, 300 are
not. Many

Given two positive integers m andn, where m <n, write a program to determine how
unique-digit integers are there in the range between m and n (both inclusive) and output
them. The input contains two positive integers m and n. Assume m <30000 and n <
30000. You are to output the number of unique-digit integers in the specified range
along with their values in the format specified below:
Test your program for the following data and some random data.
Example 1:
INPUT: m= 100 n= 120
OUTPUT: THE UNIQUE-DIGIT INTEGERS ARE: 102, 103,
104, 105, 106, 107, 108,
109, 120
FREQUENCY OF UNIQUE-DIGIT INTEGERS IS:9
Example 2:
INPUT: m=2505 n= 2525

OUTPUT: THE UNIQUE-DIGIT INTEGERS ARE:


2506, 2507, 2508, 2509, 25 10, 2513, 2514, 25 16, 2517, 2518, 2519 FREQUENCY OF
UNIQUE-DIGIT INTEGERS IS: 11

Example 3
INPUT: m=2520 n= 2529

OUTPUT: THE UNIQUE-DIGIT INTEGERS ARE: NIL


FREQUENCY OF UNIQUE-DIGIT INTEGERS IS:0
<br>

St.Stephen's chool Dum Bum


COMPUTERSCIENCE
PREBOARDS EXAMINATION 2024-25
(PRACTICAL)
Class: XII
(Maximum Marks: 30)
(Time allowed: Three hours)
(Candidates are allowed additional 15 minutes
for only reading the paper.
They must NOT start writing during this time.)

The total time to be spent on the Planning


session and Examination session
is Three hours.
Planning session: 90 minutes
Examination session: 90 minutes
Note: Candidates are to be permitted to proceed to the Examination
Session
only after the
90 minutes of the Planning Session are over.

This paper consists of three problems from which candidates are required to
attempt any one problem.
Candidates are expected to do the following:
1. Write an algorithm for the selected problem.
(Algorithm should be expressed clearly using any standard scheme such as pseudo

code or in steps which are simple enough to be obviously computable)


2. Write a program in JAVA language. The program should follow the algorithm and
should be logically and syntactically correct. Document the program using mne

monic names / comments, identifying and clearly describing the choice of data
types and meaning of variables.
3. Code / Type the program on the computer and get a print out (Hard Copy).

Typically, this should be a program that compiles and runs correctly.


4. Test run the program on the computer using the given sample data and get a print
out of the output in the format specified in the problem.
<br>

Question 1

Write a program in JAVA to accept day number (between l and 366) and year (yyyy)
from the user and display the corresponding date. Also accept 'N' from the user where
(1<=N<=100) to compute and display the future date 'N' days after the given date.
Display error message if the value of the day number or 'N' are not within the limit. Day
number is calculated taking 1 January of the given year as 1.
lest your program with given set of data and some random data
Example 1:

INPUT: DAY NUMBER: 50

YEAR: 2024
N: 25
OUTPUT:
ENTERED DATE: FEBRUARY 19, 2024
25 DAYS LATER: MARCH 15, 2024
Example 2:
INPUT: DAY NUMBER: 321

YEAR: 2024

N: 77
OUTPUT: ENTERED DATE: NOVEMBER 16, 2024
77 DAYS LATER: FEBRUARY 1, 2025

Example 3:
INPUT: DAY NUMBER: 400

YEAR: 2024

N: 125
VALUE OE N'
QUTPUT: INCORRECT DAY NUMBER INCORRECT
<br>

Question 2

Write a program to check a given string is an Anagram of another string. Two strings
if
are anagrams if they can be rearranged to form the same string. For example, "listen"
and "silent are anagrams.
Accept two strings from the user and check if they are anagrams of each other. Ensure
that the comparison is case-insensitive and ignores spaces. Display an appropriate
message basedon whether they are anagrams or not. If any of the strings contain
invalid characters (e.g., numbers or special characters), generate an error message.

Test your program with the following data and some random data:
Example 1:

INPUT: Enter first string: Listen

Enter second string: Silent


OUTPUT: STRINGS ARE ANAGRAMS
Example 2:
INPUT: Enter first string: Dormitory

Enter second string: Dirty room


OUTPUT: STRINGS ARE ANAGRAMS

Example 3:
INPUT: Enter first string: Hello

Enter second string: World


OUTPUT:

STRINGS ARE NOT ANAGRAMS


Example 4:
INPUT: Enter first string: Test123

Enter second string: 321tset


OUTPUT:
INVALID CHARACTERS IN STRING. INVALID INPUT
<br>

Question 3
like the following
arrangement (the letters are
keypads look
Most (NOT ALL) cellphone
above the respective number)
DEF
1 ABC
3
2
MNO
GHI JKL
6
4 5
WXYZ
PQRS TUV
9
7 8
[SPACE]
0

For sending text/ SMS the common problem the


is number of keystrokes to type a
particular text.
are a total of 9 keystrokes needed to type the
For example, the word "STOP", there once, the key 6 three times and
word. You need to press the key 7 four times, the key 8
the key7 once to get it.

keystrokes needed to type the tèxt. For


Develop program code to find the number of
any punctuation marks, numbers or white
this problem, accept just one word without your data with the
spaces and the text message would consist of just word. Test
1

sample data and some random data:


Example 1:
INPUT: DEAR

OUTPUT: Number of keystrokes =7


Example 2:

INPUT: Thanks
=
OUTPUT: Number of keystrokes 12

Example 3:

INPUT: Good-Bye

OUTPUT: INVALID ENTRY


<br>

Question1
A number is said to be a Goldbach number, ifthe number can
be expressed as the additon or
two odd prime number pairs. If we follow
the
even number larger than 4 is a Goldbach number
aheve condition, then we can find that every
because it must have any pair of odd prime
number pairs.
Example: 6 = 3,3 (ONE PAIR
OF ODD PRIME)
10 -3,7 and S,5 (TWO PAIRS OF ODD PRIME
)
Write a program to enter any positive EVEN natural number
generate odd prime twin of "N' N' where (|-Ne50) ano
Test your program for the following data and some random data.

Eample 1

INPUT: N= 14

OUTPUT: ODD PRIME PAIRS ARE: 3, 11

7,7
Example 2
N
INPUT: 20

OUTPUT: ODD PRIME PAIRS ARE: 17,3


13, 7

Example 3
INPUT: N44
41,3
OUTPUT: ODD PRIME PAIRS ARE:
37, 7
31, 13

Example 4
N 25
INPUT:
OUTPUT: INVALID INPUT
<br>

Question 2
Write a program to declare a matrix A UDof order (M X N) where 'M' is the number of
rows and N' the number of columns such that both M and N must be greater than 2 and
is
less thanl0. Allow the user to input integers Into this matrix. Display appropriate error
message for an invalid input.

Perform the following tasks on the matrix.


(a) Display the input matrix
(6) Shift each row one step upwards so the first row will becone the last row 2d row will be the
|" row and so on
(c) Display the rotated matrix along with the highest element and its location in the matrix
Test your program for the following data and some random data:

Example I

INPUT: M =3
N=4
Enter elements in the matrix:
100 90 87 76
200 500 167 998
77 567 89 254
OUTPUT: FORMED MATRIX AFTER ROTATING:
200 500 167 998
77 567 89 254
100 90 87 76
Highest element: 998 (Row: 0 3 )
and Column:
Example 2
INPUT: M =4
N=3
Enter elements in the matrix:
54 120 187
78 55 289
134 67 89
63 341 122
OUTPUT: FORMED MATRIX AFTER ROTATING:
78 55 289
134 67 89
63 341 122
54 120 187

Highest element: 341 (Row: 2 and Colun: 1 )

Example 3
INPUT: M=2
N=3
OUTPUT: SIZE IS OUT OF RANGE. INVALID ENTRY

4
<br>

Question
Write a program to declare a square matrix AL IL ] of order
M M where 'Mis the number
of rows and the number of colunns, such that M must be greater
than 2 and less than 10.
Accept the value of M as user input. Display an
appropriate message for an invalid input.
Allow the user to input integers into this
matrix. Perforn the following tasks:
(a) Displaythe original matrix.
(b) Check if the given matrix is Symmetric or not.
A square matrix is said to be Symmetric,
if the element of the i row and jh column
is cqual to the element of the jh row and
i column.
(c) Find the sum of the elements of lefl diagonal and the sum
of the elements of right
diagonal of the matrix and display them.

Test your progranm for the following data and some random data:

Example 1

INPUT: M3
Enter elenments of the matrix:
2 3

3 6
OUTPUT: ORIGINAL MATRIX
2 3

3 6
THE GIVEN MATRIX IS SYMMETRIC
The sum of the left diagonal= ||
The sum of the right diagonal - 10

Example 2
INPUT: M=4
Enter elements of the matrix:
9 2
4 5 3

8 3

7 6 4 2

OUTPUT: ORIGINAL MATRIX


7 9 2
4 5 6 3
1

8 5 3
7 6 4 2

THE GIVEN MATRIX IS NOT SYMMETRIC


The sum of the left diagonal= 17
=
The sum of the right diagonal 20

Example3
INPUT: M= 12

OUTPUT: SIZE IS OUT OF RANGE

You might also like