Saturday, February 25, 2012

2012 ISC Computer Science Practical Solved Paper


Program number 1 of 2012 ISC computer science practical paper

A prime palindrome integer is a positive integer (without leading zeros) which is prime as well as a palindrome. Given two positive integers m and n, where m < n, write a program to determine how many prime-palindrome integers are there in the range between m and n (both inclusive) and output them.

The input contains two positive integers m and n where m< 3000 and n< 3000. Display the number of prime palindrome integers in the specified range along with their values in the format specified below:


Test your program with the sample data and some random data:

Example 1:
INPUT: m=100
N=1000
OUTPUT: The prime palindrome integers are:
101,131,151,181,191,313,351,373,383,727,757,787,797,919,929

Frequency of prime palindrome integers: 15


Example 2:
INPUT:
M=100
N=5000
OUTPUT: Out of Range

For Solution: CLICK HERE
                   
  
Program number 2 of 2012 ISC computer science practical paper

Write a program to accept a sentence as input. The words in the string are to be separated by a blank. Each word must be in upper case. The sentence is terminated by either “.”,”!” or “?”. Perform the following tasks:

Obtain the length of the sentence (measured in words)
Arrange the sentence in alphabetical order of the words

Test your program with the sample data and some random data:

Example 1:
INPUT: NECESSITY IS THE MOTHER OF INVENTION.

OUTPUT:
Length: 6
Rearranged Sentence:
INVENTION IS MOTHER NECESSITY OF THE

Example 2:

INPUT: BE GOOD TO OTHERS.
OUTPUT:
Length: 4
Rearranged Sentence: BE GOOD OTHERS TO

For Solution: CLICK HERE


 Program number 3 of 2012 ISC computer science practical paper

Write a program to declare a matrix A [][] 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:

Display the input matrix

Find the maximum and minimum value in the matrix and display them along with their position.

Sort the elements of the matrix in ascending order using any standard sorting technique and rearrange them in the matrix.

Output the rearranged matrix.


Sample input Output

INPUT:
M=3
N=4

Entered values: 8,7,9,3,-2,0,4,5,1,3,6,-4


Original matrix:


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


Largest Number: 9
Row: 0
Column: 2
Smallest Number: -4
Row=2
Column=3

Rearranged matrix:

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

For Solution: CLICK HERE

For Complete Solution along with variable description and algorithm: CLICK HERE

2010 To 2018 Complete 9 Years Papers With Solutions: CLICK HERE

30 comments:

  1. nice... i did the 3rd question

    ReplyDelete
  2. if only I had seen class X programmes then I would have scored full marks. I did 75% of the first question.

    ReplyDelete
  3. u srsly r amazing sir.........m in 12th right nw.........nd just shifted to isc frm cbse last year...........its been vry hard fr me to cover the java of wat my fellow mates did frm the 8th std..........and after going through ur programs it has made a lot more easy fr me....i srsly thank u alot!!!!!

    ReplyDelete
    Replies
    1. Thanks but please don't write in SMS language.

      Delete
    2. Mr Dhananjoy Chakraborty I think it was kind of mean from your side to reply to his/her appreciation like that ...I think it was really nice of his/her to respect and appreciate your work...and I think it really shouldn't matter whether he/her wrote in SMS language or no...because it means the same....with all due respect sir I think on personal terms that it was kind of rude....sorry if any of my words were wrong....and thank you for your help through the program's you post

      Delete
    3. In search engine, sms languages are not accepted and that is the only reason for asking not to use sms language.

      Delete
  4. Sir, could you please post the expected programs for isc 2013?

    ReplyDelete
  5. Expected for 2013 please sir...

    ReplyDelete
    Replies
    1. sir, pls could you teach me the logic that is needed to create any program

      Delete
    2. You go through the page 'Few words about algorithm on data structure in C Programming' in this blog. Although it is a page on C - Data Structure, it will help you to build your logic.

      Through program we get our job done by programs. To get the job done, we have to pass the instructions in perfect sequence and there should not be any doubtful instruction. This is the logic of programming. If any doubt, please contact again.

      Delete
  6. sir please post the solution of this question-

    WAP to input a positive natural number N and output all combinations of consecutive natural number,which add up to give N

    example: N=15
    output:
    1 2 3 4 5
    4 5 6
    7 8

    ReplyDelete
  7. is this program for Q.1 of 2012 correct??
    import java.util.*;
    class Primepalindrome
    {
    private int n;
    private int m;
    private Scanner sc;
    //default const.
    public Primepalindrome()
    {
    n=0;
    m=0;
    sc=new Scanner(System.in);
    }
    //fn to check whether a no. is prime
    public boolean isPrime(int num)
    {
    int c=0;
    for(int i=1;i<=num;i++)
    {
    if(num%i==0)
    {
    c++;
    }
    }
    return(c==2);
    }
    //fn to check whether a no. is palindrome
    public boolean isPalindrome(int num)
    {
    int n1=num;

    int rev=0;
    int d=0;
    while(n1!=0)
    {
    d=n1%10;
    rev=(rev*10)+d;
    n1=n1/10;
    }
    return(rev==num);
    }
    //main fn
    public void main()
    {
    System.out.println("entr a no. m which is less than 3000 ");
    m=sc.nextInt();
    System.out.println("entr a no. n which is less than 3000");
    n=sc.nextInt();
    int f=0;
    if(m<n&& n<=3000)
    {
    for(int i=m;i<=n;i++)
    {
    if(isPalindrome(i)==true && isPrime(i)==true)
    {
    System.out.println(i);
    f++;
    }
    }
    System.out.println("Frequency of prime palindrome integers: " +f);
    }

    else
    {
    System.out.println("yo no. is not in d given range");
    }

    }
    }



    ReplyDelete
  8. import java.util.*;
    class Primepalindrome
    {
    private int n;
    private int m;
    private Scanner sc;
    //default const.
    public Primepalindrome()
    {
    n=0;
    m=0;
    sc=new Scanner(System.in);
    }
    //fn to check whether a no. is prime
    public boolean isPrime(int num)
    {
    int c=0;
    for(int i=1;i<=num;i++)
    {
    if(num%i==0)
    {
    c++;
    }
    }
    return(c==2);
    }
    //fn to check whether a no. is palindrome
    public boolean isPalindrome(int num)
    {
    int n1=num;

    int rev=0;
    int d=0;
    while(n1!=0)
    {
    d=n1%10;
    rev=(rev*10)+d;
    n1=n1/10;
    }
    return(rev==num);
    }
    //main fn
    public void main()
    {
    System.out.println("entr a no. m which is less than 3000 ");
    m=sc.nextInt();
    System.out.println("entr a no. n which is less than 3000");
    n=sc.nextInt();
    int f=0;
    if(m<n&& n<=3000)
    {
    for(int i=m;i<=n;i++)
    {
    if(isPalindrome(i)==true && isPrime(i)==true)
    {
    System.out.println(i);
    f++;
    }
    }
    System.out.println("Frequency of prime palindrome integers: " +f);
    }

    else
    {
    System.out.println("yo no. is not in d given range");
    }

    }
    }


    ReplyDelete
  9. im not familiar to blue j what i "&lt" in all for loops

    ReplyDelete
  10. how to write algorithms for these programs ??

    ReplyDelete
    Replies
    1. By tomorrow evening I will update the page with algorithms of the three programs.

      Delete
  11. sir give me some excepted question isc board for computer pratical plz plz help me sir........

    ReplyDelete
    Replies
    1. Expected programs are already posted as 'last minutes suggesion for ISC 2013'.

      Delete
  12. sir could you please post the programs expected for 2014

    ReplyDelete
  13. sir, could you please post the guess practical question paper of isc.

    ReplyDelete
  14. sir can you please post the solution of the program relating to anagrams (finding all possible combinations of a word with its letters)...I would be most greatfull if you do post.

    ReplyDelete
    Replies
    1. Please go to this page: http://schooljava.blogspot.com/2011/02/isc-2005-computer-practical-solved.html

      Delete

Subscribe via email

Enter your email address:

Delivered by FeedBurner