Archive

Archive for the ‘Sample Papers(Practical)’ Category

Sample Paper 2 (Practical)

February 23, 2011 3 comments

This  Practice Paper/Sample Paper is for ISC (class 12th) students appearing for the 2011 examination.

 

COMPUTER SCIENCE
Paper – 2
(PRACTICAL)
(Reading Time : 15 minutes)
(Planning Session AND Examination Session : Three Hours)

——————————————————————————————————————————-

The total time to be spent on the Planning session and the Examination session is Three hours. After completing the Planning Session, the candidate may begin with the Examination Session. A maximum of 90 minutes is permitted for the Planning Session. However, if candidates finish earlier, they are to be permitted to begin the Examination Session.

(Maximum Marks : 80 )
——————————————————————————————————————————-

As it is a practical examination the candidate is 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 ) [10]

2. Write a program in JAVA language. The program should follow the algorithm and should be  logically and syntactically correct. [20]

3. Document the program using mnemonic names / comments, identifying and clearly describing the choice of data types and meaning of variables. [10]

4. Code / Type the program on the computer and get a printout ( Hard Copy ). Typically, this  should be a program that compiles and runs correctly. [10]

5. Test run the program on the computer using the given sample data and get a printout of the output in the format specified in the problem. [10]

6. Viva-Voce on the Selected Problem . [20]

Solve any one of the following Problems.

Question 1.

Design a program to compute the completion date of a scheduled project, the starting date and the number of working days are stored in the following format:

dd, mm, yy, ww

where, dd represents the day of the month ranging from 1 to 31,

mm represents month ranging from 1 to 12,

yy represents year ranging from 0 to 99 for the year 1900 to 1999,

ww represents working days required in the range 1 to 9999.

Assume that there are no holidays during the entire project. Leap year occurs every fourth year in which there are 29 days in February.

For Example:

Input Data:

1, 3, 94, 64

Output:

PROJECT COMPLETION DATE:

DD:      3

MM:    5

YY:    1994

Test your program for the following input:

1, 8, 95, 400

 

Question 2.

The computer department of the Agency of International Espionage is trying to decode intercepted messages. The agency’s spies have determined that the enemy encodes messages by first converting all characters to their ASCII values and then reversing the string.

For example, consider A_z (the underscore is just to highlight the space). The ASCII values for A, , z are 65, 32, 122 respectively. Concatenate them to get 6532122, then reverse this to get 2212356 as the coded message.

Write a program which reads a coded message and decodes it. The coded message will not exceed 200 characters. it will contain only alphabets (A……Z, and a-z) and spaces. ASCII values of A…..Z are 65……90 and those of a….z are 97 …… 122. test your program for the following data and some random data.

SAMPLE DATA:

INPUT:

Encoded Message:

2 3 1 2 1 7 9 8 6 2 3 1 0 1 9 9 5 0 1 8 7 2 3 7 9 2 3 1 0 1 8 1 1 7 9 2 7

OUTPUT:

THE DECODED MESSAGE:  Have a Nice Day

 

INPUT:

Encoded Message:

2 3 5 1 1  0 1 1 5 0 1 7 8 2 3 5 1 1 1 2 1 7 9 9 1 1 8 0 1 5 6 2 3 4 0 1 6 1 1 7 1 1 4 1 1 4 8

OUTPUT:

THE DECODED MESSAGE: Truth Always Wins


Question 3.

A mathematician who is working with extremely large integers represents them using a doubly linked list. For example, the number 7328 will be represented as the doubly  linked list with four nodes:

7                       3                           2                                8

1st node       2nd node            3rd node              4th node

The predecessor of the first node and the sucessor of the last node are null.

Write a program that reads in two integers (assume they are integers for testing), converts them to the above representation, prints them out with each digit separated by commas and checks whether the two numbers are equal or not. The equality check should work on the representation and not on the integers. Here are sample outputs:

SAMPLE DATA:

INPUT:

Give the first number: 3 4 5 6 3

Give the second number: 3 4 5 6 2

OUTPUT:

First number: 3, 4, 5, 6, 3

Second number: 3, 4, 5, 6, 2

Unequal

INPUT:

Give the first number: 56432

Give the second number: 56432

OUTPUT:

First number: 5, 6, 4, 3, 2

Second number: 5, 6, 4, 3, 2

Equal

 



Sample Paper 1 (Practical)

February 15, 2011 Leave a comment

This Practice Paper is for Class XII (ISC Board) for the year 2011. Try to do it in the time given at the head of the paper. I am sure it will be of help to you.  For Theory Practice Paper you can go to  Sample paper 1 (Theory)

COMPUTER SCIENCE

Paper – 2

(PRACTICAL)

(Reading Time : 15 minutes)

(Planning Session AND Examination Session : Three Hours)

—————————————————————————————————————-

The total time to be spent on the Planning session and the Examination session is Three hours. After completing the Planning Session, the candidate may begin with the Examination Session. A maximum of 90 minutes is permitted for the Planning Session. However, if candidates finish earlier, they are to be permitted to begin the Examination Session.

(80 Marks)

—————————————————————————————————————

 

As it is a practical examination the candidate is 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 ) [10]

2. Write a program in JAVA language. The program should follow the algorithm and should be logically and syntactically correct. [20]

3. Document the program using mnemonic names / comments, identifying and clearly describing the choice of data types and meaning of variables. [10]

4. Code / Type the program on the computer and get a printout ( Hard Copy ). Typically, this should be a program that compiles and runs correctly. [10]
5. Test run the program on the computer using the given sample data and get a printout of the output in the format specified in the problem. [10]

6. Viva-Voce on the Selected Problem . [20]

 

Solve any one of the following Problems.

Question 1.

Accept a paragraph of text consisting of sentences that are terminated by either “.”  ,  “,”  ,  “!”  or a  “?”  followed by a space. Assume that there can be a maximum of 5 sentences in a paragraph. Design a program to perform the following :

(a) Arrange the sentences in alphabetical order of words, sentence by sentence.

(b) Separate the words which begin with a vowel.

Sample Data 1:

INPUT: HELLO ! HOW ARE YOU ? WHEN ARE YOU COMING ? HOPE TO SEE YOU SOON.

OUTPUT: HELLO ! ARE HOW YOU ? ARE COMING WHEN YOU ? HOPE SEE SOON TO YOU.

VOWELS: ARE

Sample Data 2 :

INPUT : THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.

OUTPUT : BROWN DOG FOX JUMPED LAZY OVER QUICK THE THE.

VOWELS: OVER

Question 2.

Given a time in numbers we can convert it into words. For example:

5 : 00                                                       five O’ clock

5 : 10                                                       ten minutes past five

5 : 30                                                       half past five

5 : 40                                                       twenty minutes to six

5 : 45                                                       quarter to six

5 : 47                                                       thirteen minutes to six

Write a program which first inputs two integers, the first between 1 and 12 (both inclusive) and the second between 0 and 59 (both inclusive). It then prints out the time they represent in words. Your program should follow the format -

SAMPLE DATA

Input:

Enter Hours:     3

Enter Minutes :   0

Output :

Time:

3 : 00

Three O’ clock

Input

Enter Hours :    7

Enter Minutes:   29

Output :

Time:

7 : 29

Twenty nine minutes past seven

Input

Enter Hours:  14

Enter Minutes : 60

Output :

Incorrect Input

INPUT:

Enter Hours: 0

Enter Minutes: 60

OUTPUT:

Incorrect input

Question 3.

A Smith number is a composite number, the sum of whose digits is the sum of the digits of its prime factors obtained as a result of prime factorization (excluding 1). The first few such numbers are 4, 22, 27, 58, 85, 94, 121 ………..

For Example

1. 666

Prime factors are 2,3,3 and 37

Sum of the digits are (6+6+6) = 18

Sum of the digits of the factors (2+3+3+(3+7)) = 18

2. 4937775

Prime factors are 3, 5, 5, 65837

Sum of the digits are (4+9+3+7+7+7+5) = 42

Sum of the digits of the factors (3+5+5+(6+5+8+3+7) = 42

Write a program to input a number and display whether the number is a Smith number or not.

Sample data:

INPUT 94                                         Output SMITH Number

Input 102                                        Output NOT SMITH Number

Input 666                                        Output SMITH Number

Input 999                                        Output NOT SMITH Number

Follow

Get every new post delivered to your Inbox.

Join 202 other followers

%d bloggers like this: