Visit www.ncerthelp.
com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
KENDRIYA VIDYALAYA SANGATHAN
Class – XI
Subject : Informatics Practices
MM:70 Time : 3 hours
General Instructions :
i) All questions are compulsory.
ii) Answer the questions after carefully reading the text.
iii) Please check that this question paper contains 7 questions.
iv) Do all the parts of same questions together.
Q1. (a) Name the basic units of a computer system. 1
(b) What is an Operating System. Name any two example. 2
(c) Give one point of difference between OCR and OMR. 1
(d) What is a port ? Name any two port types. 2
(e) Write any one advantage of TFT display. 1
(f) What do you understand by Computer Security ? Name any two threats to 2
computer security.
(g) Why IDE are useful in application development. 1
Q2.
(a) What is the role of JVM in platform independence in Java. 2
(b) Give the syntax and example of declaring variable. 1
(c) Give any two properties of TextField control in java. 1
(d) Differentiate between the following : 1x2
(i) if and switch (ii) runtime errors and logical errors
(e) What will be the value of following expressions if j=5, 1x2
Please (1)
Visit(5*++j)%6
www.ncerthelp.com
(2) (5*j++)%6For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(f) Why program maintenance is considered very important. 2
Q3. (a) What is SQL ? What are the different categories of SQL commands. 2
(b) Name all the integrity constraints used during table creation. 1
(c) Describe the following commands with syntax and example:
(i) insert command 2
(ii) update command 2
(e) When a column value is skipped in an insert command , which value is inserted 1
in the table.
(d) A table has 5 columns and 10 rows. What is its degree and cardinality. 1
(e) Give one point of difference between the primary key and foreign key. 1
Q4.
(a) Write a program in java to calculate the sum of all the no. divisible by 5 in 2
the range 1 to 50.
(b) Write the output of the following code: 2
int i=0,x=0;
do{
if(i%5==0){
x++;
System.out.println(x + “\n”);
++i;
}while(i<20);
System.out.println(x);
(c) Rewrite the following while loop into a for loop: 2
int s=0;
while(s<=13){
if(s%2==2)
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
{ System.out.println(“Color is red”);
else
{System.out.println(“Color id blue”);
System.out.println(“New color”);
s=s+1;
(d) Rewrite the corrected program after removing errors, underline the corrections: 2
Int I=5,J=10;
if (I<J)||(I=10))
System.out.println(“OK \n”);
System.out.println(”Not OK”);
(e) Design the following application and answer the questions that follow :
(c) Write the code for the Clear button to clear all the textfields (txtPrincipal & txtTime) 2
and checkbox. Set the default choice in the radio button as Fixed Deposit. Suppose
the name of radio button Fixed Deposit is radioFD and Recurring Deposit is radioRD.
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(d) Write the code for the calculate button to calculate compound interest (P*(1+R/100)^T)
and amount ( Principal + Compound Interest) and display the values in the txtInterest and
txtAmount depending on principal, rate and time.
Rate is calculated based on the time according to the following table: 5
Account Time Rate
Fixed Deposit <= 1 10%
>1 and <=5 12%
>5 15%
Recurring Deposit <= 2 11%
>2 and <=7 12%
>7 15%
An additional rate of 2% is given to the senior citizens i.e. if the chkSR checkbox is
checked.
Q5.
(a) (i) Write an SQL query to create table “bank” with the following structure : 2
Field Type Constraint
AccountNo Integer Primary Key
CustName Varchar(20) Not Null
Address Varchar(30) -
ContactNo Varchar(10) Not Null
Balance Decimal Must be >=1000
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(b) Write an SQL query to create table “transaction” with the following structure : 2
Field Type Constraint
AccountNo Integer Foreign Key related to the AccountNo
of bank table
Trans_date Varchar(10) Not Null
Trans_type Varchar(20) -
Amount Decimal Must be >0
(c) Write the output of the following SQL command: 4
(i) select concat(Lcase(‘To be’),trim(Trailing ‘.’ From ‘ continued…’));
(ii) select round(15.193,1)+truncate(2.24,1);
(iii) select len(trim(‘Ajay#Jain###’)) (# means blank space)
(iv) select mid(trim(‘#Informatics Practices##’),6,6); (# means blank space)
(d) What is the difference between DELETE and DROP commands of SQL. 1
(e) What is a constraint. 1
Q6.
(a) There is a table T1 with combination of columns C1, C2, and C3 as its primary key? Is 2
it possible to enter:
a. NULL values in any of these columns?
b. Duplicate values in any of these columns?
(b) Consider the following “employee” table and write the output of the following 4
SQL queries:
EmpNo Name Job Gender Salary DeptNo Commission
101 Reena President F 30000 10 300
102 Shankar Manager M 18000 10 400
103 Meena Manager F 15000 20 300
104 Payal Clerk F 5000 30 100
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(i) Display the name of those employees whose name contains ‘ee’.
(ii) Display the name, salary and deptno of those employees whose salary is in the range
10000 and 30000. Order the query output in ascending order of name.
(iii) Display all the details of Female Manager and President having salary >10000.
(iv) Double the commission of those employees working in deptno 20 and 30.
(c ) Consider the above table and perform the following: 4
(i) In the employee table add a column mobileno. of datatype number with maximum of
10 digits with default value of 0000.
(ii) Display the names of employees having exactly four lettered names.
(iii) Add a primary key constraint EmpNo in the employee table.
(iv) Remove the column Gender.
Q7.
(a) Name any two e-governance websites of India. 1
(b) How has e-learning benefited the students. 2
(c) Describe any two positive impacts of e-business. 2
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
MARKING SCHEME
Subject : Informatics Practices
Class- XI
MM:70 Time : 3 hours
Q1. (a) Input Unit, Output Unit, CPU , Memory (1
mark)
(b) Operating System is a program which act as an interface between a user ( 1 marks)
and the hardware(i.e. all computer resources).
Example : Windows & Unix ( ½ + ½ marks)
(c) Any one difference between OCR and OMR. ( 1 mark)
(d) Ports are the points on computer having associated circuitry to allow ( 1 mark)
connection of external devices with computer.
Serial port and parallel port ( ½ + ½ marks)
(e) Use less power than a normal monitor and can display text and graphics ( 1 mark)
in a wide range of colours.
(f) Computer Security: It is the ability of a system to protect information and
system resources with respect to confidentiality and integrity . ( 1 mark)
Viruses and spyware ( ½ + ½ marks)
(g) It is a software tool to help programmer to edit, compile, interpret and debug the (1
marks)
program in the same environment.
Q2. (a) JVM is an abstract machine designed to implemented on the top of (2 marks)
existing processors. It hides the underlying operating system .
(b) datatype <variable_name>;
(1/2 mark)
int a; (1/2 mark)
(c) text and name (any two properties) ( ½ + ½ marks)
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(d)
(i) if can evaluate a relational or logical expression whereas switch can test
for equality ( 1 mark)
(ii) Runtime errors occurs at run time whereas in case the application is not
giving any compilation or runtime error but still giving a incorrect output, it is
logical errors. ( 1 mark)
(e) (i) 0 ( 1 mark) (ii) 1 ( 1 mark)
(f) Correct explanation (2 mark)
Q3. (a) SQL: In order to access data within the database, all programs and user (1
mark)
must use , SQL . It is the set of commands that is recognized by nearly all
RDBMS.
DDL , DML, TCL Session Control and System control commands. (1 mark)
(b) Primary Key, Not Null, Foreign Key, Check, Default, Unique (1 mark)
(c)
(i) insert command is used ti insert new record into the table. (1 mark)
The syntax is
Insert into tablename values(exp-1,exp-2,exp-3…………..);
Insert into emp values(101,’seema’,’president’……………….); ( ½ + ½ marks)
(ii) update command is used to change some or all of the values in an (1 mark)
existing row.
The syntax is
Update <table_name> set colname-newvalue,……………………
Where <search_condition>;
Exp: update item set itemname=’key’ where itemno=1;
( ½ + ½ marks)
(d) degree=5 and cardinality = 10 ( ½ + ½ marks)
(e) primary key is used ti uniquely identify the tuples of a table whereas
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
Foreign key is a column of a table which is primary in parent table (1 mark)
Q4. (a) int i , sum=0; (2 marks)
for(i=1;i<=50;++i)
if(i%5= =0)
sum=sum+l;
System.out.println(“Sum” + sum);
(b) Output is (2 marks)
(c) (2 marks)
for(int s=0;s<=13;++s){
if(s%2==2)
{ System.out.println(“Color is red”);
else
{System.out.println(“Color id blue”);
System.out.println(“New color”);
(d) Rewrite the corrected program after removing errors, underline the corrections:
int I=5,J=10; (1/2 mark)
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
if ((I<J)||(I= =10)) (1 mark)
System.out.println(“OK”+” \n”); (1/2 mark)
System.out.println(”Not OK”);
(e)
(a) txtPrincipal.setText(“ ”); (1/2
mark)
txtTime.setText(“ ”); (1/2
mark)
chkSR.setSelected(false); (1/2
mark)
radioFD.setSelected(true); (1/2
mark)
(b) float P= Float.ParseFloat(txtPrincipal.getText()); (4 marks)
float T= Float.ParseFloat(txtTime.getText());
if(radioFD.isSelected()==true)
if(T<=1)
R=10;
elseif(T>1 && T<=5)
R=12;
elseif(T>5)
R=15;
else
if(T<=2)
R=11;
elseif(T>2 && T<=7)
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
R=12;
elseif(T>7)
R=15;
if(chkSR.isSelected()==true)
R=R + 2;
float CI= (P*Math.pow((1+R/100),T));
float A=P+CI;
jLabelInt.setText(‘”+CI);
jLabelAmt.setText(‘”+A);
Q5. (a) (i) SQL query to create table “bank”
Create table bank( AccountNo Integer Primary Key, (1/2
mark)
CustName varchar(20) Not Null, (1/2
mark)
Address varchar(30),
ContactNo varchar(10) Not Null, (1/2
mark)
Balance Decimal check(Salary>=1000) (1/2
mark)
);
(b) SQL query to create table “transaction”
Create table transaction( AccountNo Integer references bank(AccountNo), (1/2 mark)
Trans_date varchar(10) Not Null, (1/2 mark)
Trans_type varchar(20), (1/2 mark)
Amount Decimal check(Amount>0) (1/2 mark)
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12
);
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
Field Type Constraint
AccountNo Integer Foreign Key related to the AccountNo
of bank table
Trans_date Varchar(10) Not Null
Trans_type Varchar(20) -
Amount Must be >0
(c) Write the output of the following SQL command: 4
(i) To be continued 1 mark
(ii) 17.4 1 mark
(iii) 9 1 mark
(iv) matics 1 mark
(d) DELETE is DML command while DROP is a DDL command. 1 mark
Delete is used to delete rows from a table while DROP is used to remove the entire table
from the database.
(e) A constraints is a condition or check application on a field or set of fields.. 1 mark
Q6.
(a)
a. it is not possible to enter NULL values in any of these columns. 1 mark
b. While it is possible to enter duplicate values in these columns but the combination 1 mark
of C1,C2,C3 should be unique.
(b)
(i) select Name from employee where Name like ‘%ee%’; 1 mark
(ii) select Name, Salary, DeptNo from employee 1 mark
where Salary between 10000 and 30000
order by Name;
(iii) select * from employee 1 mark
where Gender =’F’ and Job in (‘Manager’,’President’) and salary >10000;
(iv) update employee set Commission=2*Commission 1 mark
Please VisitDeptno
Where www.ncerthelp.com
in (20,30); For Video lectures of all subjects Class 9 to 12
Visit www.ncerthelp.com For All NCERT solutions,
CBSE sample papers, Question papers, Notes for Class 6 to 12
(c )
(i) alter table employee add (mobileno Integer default 0000); 1 mark
(ii) select Names from employee where Name like ‘_ _ _ _’; 1 mark
(iii) alter table employee add constraint pk primary key EmpNo 1 mark
(iv) alter table employee drop column Gender. 1 mark.
Q7.
(a) (i) www.incometaxindia.gov.in (ii) www.india.gov.in (1 mark)
(b) (1) availability of same course to millions. (2 marks)
(2) boon for working class.
(c)
(1) Offers opportunity to access new markets across the globe. (2 marks)
(2) Provides convenience and comfort for customers.
Please Visit www.ncerthelp.com For Video lectures of all subjects Class 9 to 12