Skip to main content

Featured

functions in Python

Class 12 IP sample paper 1solved


SAMPLE PAPER-1

INFORMATICS PRACTICES

Time: 3 Hours                                                                                                              Maximum Marks:70

Note.

  1. This question paper is divided into three sections.
  2. Section-A and Section-B are of 25 Marks each.
  3. Section –C consist of 20 marks
  4. Answer the question after carefully reading the text.
  5. All questions are compulsory.

Section –A

1.    Answer the following questions:

a)    Write the purpose of the following:                                                                                   [2]

(i) Repeater (ii) Router

b)    Expand the following abbreviations and explain in brief:                                                 [2]

(i)            GUI (ii) ODBC

c)    What are following software used for?                                                                             [2]

(i)            Open Office          (ii) Mozilla                                                                                           

d)    Differentiate between star topology and Ring topology   .                                               [2]

e)    Name two communication cables used in networking and explain any one.                  [2]

2.    Answer the following questions:

a.    Is E Governance. Better than normal Governance. Explain.                                 [1]

b.    Why e-learning is used.                                                                                               [1]

c.    What is the front end and back end in Java?                                                           [1]

d.     Mr. Ram works for the Customs Department. He wishes to create controls on the form for the following functions. Choose appropriate controls from Text box, Label, Option button, Check box, Combo box, Command button and write in the third column                                                                                                                             [2]

S.no
Control used to
Control
1.
Enter last name
 
2.
Choose you Gender (M/F)
 
3.
 
Choose the name of country That issued passport
 
4.
Submit form
 

 

 

 

 

3.    Answer the following questions:

a)    What is the purpose of ALTER TABLE Command?                                                        [2]

b)    Why do we use ROLLBACK statement? Explain in brief with the help of an example   [2]

c)    After creating the “school” database you want to use it. Write the command that you. should give.                                                                                                                              [1]

d)    Explain the two wildcard character – and % used with the LIKE clause                         [2]

e)    What are joins? Why are they used?                                                                                [2]

f)     What is the importance of group function in MySQL?                                                    [2]

 

SECTION-B

  1. ABC School uses the following interface built in java to check the eligibility of a student for a particular stream from science, commerce and humanities. The user first enters the total percentage and selects the desired stream by selecting the appropriate option button. An additional 5%  is marks is given to students of NCC.

 

1.jpg

Write Java Code for the following

a)    On the Action event of the close button the application gets closed.            [2]

b)   On the Action event of the clear button all the text fields and the check boxes get cleared.                                                                                                                      [2]

c)    On Action event of the button ‘Calc Percentage’ Net percentage of the student is calculated and displayed in the appropriate text filed. Net percentage is same as that of the actual percentage if the student doesn’t opts for NCC otherwise 5% is added to actual percentage.                                                                           [3]

d)   On Action Event of the button ‘Result’, the application checks the eligibility of the students. And display result “ in the appropriate text field. Minimum percentage for science is 70, for commerce 60 and  for humanities 40.                                  [3]

5.    Answer the following questions:

a)    What will be the output of the following code snippet?                                               [2]

int x= 10;

int y = 20;

if ((x<y)||(x=5) > 10)

                                    System.out.println(x);

else

                                    System.out.println(y)

 

b)    Find the syntax errors if any in the following programme:                                         [2]

int i ; sum=0;

i=1;

while(i=<10)

{

            sum=sum+i;

            i=i+3

}

System.println(sum);

c)    Rewrite the following switch statement using if-else statement and display the result using appropriate IDE.                                                                                              [2]

switch(number){

            case 1:

                        jLable2.setText(“digits”);

                        break;

            case 10:

                        jLable2.setText(“Tens”);

                        break;

case 100:

                        jLable2.setText(“Hundreds”);

                        break;

case 1000:

                        jLable2.setText(“Thousands”);

                        break;

            default:

                        jLable2.setText(“error”);

                        break;

            }

d)    What is difference between jRadioButton and jCheckBox?                                          [2]

e)    Write the method used  to set some value in the label                                                   [1]

f)     What is JDBC-ODBC in Java? Name the package that provides SQL Driver for java.[2]

g)    Differentiate between UL and OL tags used in HTML ?                                                [1]

h)   Create a page about your hobbies(At List three hobbies). On the page include link to interesting sites that coincides with your description. For instance, if you like sports, you might create a link to http://cnn.com/SPORTS/ for the benefit of your users.        [3]

 

                           SECTION-C

6.    Answer the following questions:

(a)  Write the difference between COMMIT and ROLLBACK                                          [2]

Consider the following tables PRODUCT and answer (b) and (c) part of this question

Relation :PRODUCT

PCODE PNAME        COMPANY     PRICE STOCK           MANUFACTURE       WARRANTY
P001    TV                   BPL                 10000 200                  12-JAN-2008              3
P002    TV                   SONY             12000 150                  23-MAR-2007                         4
P003    PC                   LENOVO        39000 100                  09-APR-2008              2
P004    PC                   COMPAQ       38000 120                  20-JUN-2009              2
P005    HANDYCAM  SONY             18000 250                  23-MAR-2007                       3

(b)  Write MySQL commands for following Statements

                              i.        To show details of all the PC with stock more than 110.                            [1]

                            ii.        To list the company which gives warranty for more than 2 years.             [1]

                           iii.        To find stock value of the BPL company where stock value is sum of the products of price and stock.                                                                                  [1]

                           iv.        To show number of products from each company.                                     [1]

                            v.        To count the number of PRODUCTS which are manufactured in 2009.  [1]

                           vi.        To show the PRODUCT name which are within warranty as on date.    [1]

(c)   Give the output of following MySQL statement.                                                      [4]

(i) Select COUNT (distinct company) from PRODUCT;

(ii) Select MAX (price) from PRODUCT where WARRANTY<=3;

(iii) select AVG (price) from PRODUCT where Company=”SONY”;

(iv) Select MIN (price) from PRODUCT where stock<200;

 

7.    Answer the following questions:

a)    Study the following table STAFF and Salary and write MySQL command for the questions (i) to (iv)and give output for the (v) to(vi)

TABLE: STAFF

ID
Name
DEPT
SEX
EXPERIENCE
101
Siddharat
Sales
M
12
104
Raghav
Finance
M
6
107
Naman
Research
M
10
114
Nupur
Sales
F
3
109
Janvi
Finance
F
9
105
Rama
Research
M
10
117
James
Sales
F
3
111
Binoy
finance
F
12
130
Samuel
Sales
M
15

 

TABLE: SALARY

ID
Basic
Allowance
Commission
101
15000
1500
800
104
17000
1200
500
107
16000
1000
200
114
20000
2200
550
109
18000
1000
250
105
15000
1200
150
117
18000
1700
100
111
20000
1500
300
130
18000
1200
500

 

(i)            Display NAME of all the staff who is in SALES having more than 10 year experience from the table staff.                                                                                                                         [1]

(ii)          Display the average Basic Salary of all staff working in ”Finance” department using the table staff and salary.                                                                                                            [1]

(iii)         Display the minimum ALLOWANCE of female staff.                                                                  [1]

(iv)         Display the highest commission among all male staff                                                     [1]

(v)          Select count(*) from STAFF where sex=’F’;                                                                                [1]

(vi)         SELECT NAME,DEPT,BASIC FROM STAFF,SALARY WHERE DEPT=’SALES’ AND STAFF.ID=SALARY.ID;                                                                                                   [1]

(b)       Answer the question based on the table VOTER given below:

 

Table :   VOTER

Column Name
Data type
Size
Constraints
Description
V_id
BIGINT
8
Primary key
Voter identification
Vname
VARCHAR
25
Not null
Name of the voter
Age
INT
3
Check>17
Age should not less than equal to 17
Address
VARCHAR2
30
 
Address of voter
Phone
VARCHAR
10
 
Phone number of the voter

(i)            Write the command  to delete all the rows of particular voter from  the table voter where voter ID between 10 and 20.                                                                                        [1]

(ii)          Delete the table physically.                                                                                                      [1]

 

SAMPLE PAPER -1

(ANSWER KEY)

Q.1 (a) (i) Repeater :- It is a physical device to strengthen the signals

            (ii) Router :- It is a physical device that select best output line that will lead a

              packet to destination.

(b) (i) GUI:- Graphical User Interface     (ii) ODBC:- Open Data Base Connectivity

(c) (i) Openoffice :- word processor, spreadsheet, graphics program, presentation etc.

      (ii) Mozilla :- Web Browsing

(d) Star topology Vs Ring Topology :-

(i) Ring topology user a single shared cable for connecting all workstations where as star uses dedicated cable for every workstation

(ii) To form star topology switch or hub is required

(iii) In star topology finding a faulty station is easy.

(iv ) For long distance star topology is not suggested because separate cables are required for every station.

(e) Communication Cables : -(i)Twisted Pair:-  Category-3, Category-5 or Category-6 ( also called CAT-3, CAT-5 or CAT-6) or UTP Cables (Unshielded Twisted Pair) Two copper wires are twisted together just like a structure of DNA and such 4 pairs are bundled together called UTP. RJ45 connectors are used to connect computer using UTP cables

(ii) Coaxial Cable (iii) Fiber Cable

 

Q.2 (a) e-governance :- Yes, because it provides better control at affordable cost and in fastest possible time.

(b) e-learning :- to teach through technology.

(c) front end :- It is interface part of the application which is used to interact with user such as Java Swing

Back end:- Database application which stores persistent data. JDBC provides this facility to connect java application with Database.

(d)

S.no
Control used to
Control
1.
Enter last name
TextField
2.
Choose you Gender (M/F)
Radio Button
3.
 
Choose the name of country That issued passport
Combo Box
4.
Submit form
Button

Q.3 (a) Alter Command :- It is used to modify the table such as add or remove column , change the data type and size of column or add/delete constraints.

(b) Rollback :- It is used to cancel changes made in database. Example

ROLLBACK;

ROLLBACK WORK;

 (c) USE school

(d) _ it represents any single character

     % it represents any number of characters.

(e) joining means combining two or more table. If we want to get data from two or more table we need to join them.

(f) There are five aggregate function also called group function. sum(), avg(), min(), max() and count() . It works on multiple data and returns single value result.

 

Q.4 (a) System.exit(0);

        (b) jTextField1.setText(“ “)  OR  jTextField1.setText(null)

              jTextField1.setText(“ “)  OR  jTextField1.setText(null)

              jTextField1.setText(“ “)  OR  jTextField1.setText(null)

              jTextField1.setText(“ “)  OR  jTextField1.setText(null)

              jCheckbox1.setSelected(false);

       (c) int p;

            p=Integer.parseInt(jTextField2.getText());

            if (jCheckBox1.isSelected())

                     p=p+5;

            jTextField3.setText(Integer.toString(p));

(d) int p;

      p=Integer.parseInt(jTextField3.getText());

      if( jRadioButton1.isSelected())

      {

               if ( p>=70)

               jTextField4.setText(“Eligible for all subject”);

               else

               jTextfield4.setText(“Not Eligible for science”);

       }

     else if( jRadioButton2.isSelected())

      {

               if ( p>=60 )

               jTextField4.setText(“Eligible for Commerce and Humanities”);

               else

               jTextfield4.setText(“Not Eligible for Science and Commerce”);

       }

      else 

      {

               if ( p>=40 )

               jTextField4.setText(“Eligible for Humanities”);

               else

               jTextfield4.setText(“Not Eligible for any subject ”);

       }

 

Q.5 (b) int i ; sum=0;

i=1;

while(i=<10)

{

            sum=sum+i;

            i=i+3

}

            System.println(sum);

 

Corrected code

int i , sum=0;

i=1;

while(i<=10)

{

            sum=sum+i;

            i=i+3;

}

            System.out.println(sum);

(c) if (number = = 1)

jLable2.setText(“digits”);

else if ( number = = 10)

jLable2.setText(“Tens”);

else if (number==100)

jLable2.setText(“Hundreds”);

else if(number==1000)

            jLable2.setText(“Thousands”);

else

jLable2.setText(“error”);

(d) Using radio button we can provide many option but user can select only one

       Whereas using check box user can select all, more then one or none.

(e) setText()

(f) JDBC-ODBC :- JDBC stands for Java Data Base Connectivity and ODBC stands for Open Data Base Connectivity. To connect Java based application for any Database JDBC connectors are used. Java.sql.* is used to include sql drivers.

(g) UL is used to define un ordered  list whereas OL for ordered list.

(h) Create a page about your hobbies(At List three hobbies). On the page include link to interesting sites that coincides with your description. For instance, if you like sports, you might create a link to http://cnn.com/SPORTS/ for the benefit of your users

<html>

<title></title>

<body>

Select your Hobbies

<a href=”http://www.cnn.com/cricket.htm”>Cricket</a><br>

<a href=”http://www.cnn.com/football.htm”>Football</a><br>

<a href=”http://www.cnn.com/hockey.htm”>Hockey</a><br>

</body>

</html>

6.    Answer the following questions:

(a)  Difference between COMMIT and ROLLBACK 

Commit: This command permanently commits all the changes made in the database after last commit command was executed. After committing the transaction, changes made can not be rolled back.

 

RollBack : This command rolls back (undoes) all the changes made in the database after last commit command was executed.

 

(b)

                          vii.        SELECT * FROM PRODUCT

WHERE PNAME = ‘PC’ AND STOCK > 110;

                         viii.        SELECT COMPANY FROM PRODUCT

WHERE WARRANTY > 2;

                           ix.        SELECT  PRICE * STOCK  “STOCK VALUE”

FROM PRODUCT

WHERE COMPANY = ‘BPL’;

                            x.        SELECT COMPANY, COUNT(DISTINCT PNAME) “PRODUCTS”

FROM PRODUCT

GROUP BY COMPANY;

                           xi.        SELECT COUNT (*) FROM PRODUCT

WHERE YEAR(MANUFACTURE ) = 2009;

                          xii.        SELECT  PNAME  FROM PRODUCT

WHERE  YEAR(MANUFACTURE + CURDATE()) <= WARRANTY;

(c) Give the output of following MySQL statement.                                                   [4]

i.      4

ii.             39000

iii.            15000

iv.           12000

 

7.    Answer the following questions:

a)    Study the following table STAFF and Salary and write MySQL command for the questions (i) to (iv)and give output for the (v) to(vi)

 

                      I.    SELECT NAME FROM STAFF

WHERE DEPT = ‘Sales’ AND EXPERIENCE > 10;

                    II.    SELECT AVG(Basic) FROM STAFF, SALARY

WHERE STAFF.ID = SALARY.ID AND DEPT = ‘Finance’;

                   III.    SELECT MIN(Allowance) FROM STAFF, SALARY

WHERE STAFF.ID = SALARY.ID AND SEX = ‘F’;

                  IV.    SELECT MAX(Commission) FROM STAFF, SALARY

WHERE STAFF.ID = SALARY.ID AND SEX = ‘M’;

                    V.    4

                  VI.     

Name
DEPT
Basic
Siddharat
Sales
15000
Nupur
Sales
20000
James
Sales
18000
Samuel
Sales
18000

 

(b)       Answer the question based on the table VOTER :

(i) DELETE FROM VOTER

      WHERE V_ID BETWEEN 10 AND 20;

ii)  DROP TABLE VOTER;                                            

 

Comments

  1. Thank you dear Bharath for your encouraging words. As and when I get time, I try to post something relevant to IT students or IT World or programming.

    ReplyDelete

Post a Comment

Popular Posts