Notes XI IP With Question Bank 123
Notes XI IP With Question Bank 123
सत्र – 2022-23
इन्फोमेटिक्स प्रेटक्िस
INFORMTICS PRACTICES
CHIEF PATRON
PATRON
Mr. B. L. Morodia
Deputy Commissioner
KVS Regional Office, Jaipur
MENTORS
Coordinator
Mr. Manoj Kumar Pandey,
Principal,
Kendriya Vidyalaya Itarana, Alwar
Members
Weightage
Unit and Topic 1 2 3 5 4 A B C D E
DDL:CREATE TABLE 1 1 1 8 5 20 32
DQL: SELECT, FROM, WHERE. 1 1 6 13 23 33
DML: INSERT 1 1 1 7 8 23 33 35
Unit 4: Introduction to the Emerging 5
Trends
Artificial Intelligence, Machine Learning,
Natural Language Processing, Immersive 4 29
experience (AR, VR), Robotics, Big data
and its characteristics,.
2 1 5
Internet of Things (IoT), Sensors, Smart
cities, Cloud Computing and Cloud 18 29
Services (SaaS, IaaS, PaaS); Grid
Computing, Block chain technology.
NUMBER OF QUESTION 18 7 5 3 2 35
TOTAL MARKS 18 14 15 15 8 70
Unit 1: Introduction to Computer System
- Introduction to computer and computing: evolution of computing devices,
components of a computer system and their interconnections, Input/output
devices.
- Computer Memory: Units of memory, types of memory – primary and secondary,
data deletion, its recovery and related security concerns.
- Software: purpose and types – system and application software, generic and
specific purpose software.
Abacus
It was the first calculating device with wooden frames along with beams sliding
on wires. It was used to perform basic arithmetic operations such as addition,
subtraction, multiplication, and division. It is also used to teach at early age
schools to count numbers.
Napier’s Bones
It was made by a Scottish mathematician named Sir John Napier in 1616. It had
numbers carved on bones or strips of wood. It was also used for simple
calculations. In addition to this it was used for calculating the root of the number.
Pascaline
It was invented by Blaise Pascal a French mathematician in 1641. It was the first
mechanical calculator. It has a rectangular box with movable wheels. It was also
used for simple calculations up to hundreds and thousands.
Difference Engine
It was invented by Charles Babbage in the Nineteenth Century. It was used to
prepare mathematical tables.
Analytical Engine
It was considered as the first-generation computer invented by Charles Babbage.
It had some basic elements such as input, output, and memory devices.
1. Input Devices
2. Central Processing Unit
3. Output Devices
The basic component structure of computer is as shown below:
As shown in the diagram , various parts of the computer interact together to make the
computer work. You input data to the computer by using input devices and the CPU acts
upon this data and provides output which is made available to the user by using the
output device.
Input devices
Input device is responsible for taking input from the user and providing it to the
computer. Some most commonly used input devices are
● Keyboard
● Mouse
● Microphone
● Webcam
● Scanner
● Barcode reader
● Light pen
● Joystick
Output devices
Output device is responsible for providing and displaying output to the user.
Some most commonly used output devices are:
● Monitor- LED Monitor, LCD Monitor, CRT Monitor
● Printer- Impact Printer (Inkjet, Dot-Matrix), Non-Impact Printer
(Laser, Inkjet)
● Plotter
● Speaker
ALU (Arithmetic and Logical Unit) ALU is a component which is responsible for
all the arithmetic or logical operations done on the data. Arithmetic operations are
the basic mathematical calculations. Logical operations are basically comparison
operations involving comparing data.
CU (Control Unit) The control unit is a component which controls the flow of
data and operations in a computer. It acts as a manager and instructs and
coordinates all the components of the CPU to perform their respective task.
- RAM: Random Access Memory is the memory that the computer uses for storing
the programs and their data while working on them. We can either read data
from the RAM or write onto it. Hence it is called read/write memory.
- ROM: Read Only Memory is used to store the data about the hardware which
does not require frequent updates, for example startup programs that load
Operating System into RAM. ROM is non-vOneertile memory. We can only read
data from the ROM and hence called read only memory.
- Cache Memory: Catch memory is very high speed memory which is placed
between processor and RAM to speed up the operations of CPU. Generally it
stores the copies of data frequently accessed from RAM.
- Data Storage: Data storage refers to the process of storing captured data for
future use. There are many different types of storage devices available which can
be used to store data. Nowadays due to the rise in computers, Internet and
Technology large volumes of data being produced and hence the storage device
should be of large capacity and updated regularly. to store large amounts of data,
Server can be deployed or Cloud computing can also be used.
- Data Retrieval: Data Retrieval refers to accessing or fetching data from storage
devices as per requirement. Due to the large volume of data nowadays, systems
must have good quality and effective programs in order to access data at
minimum time.
- Deleting data refers to erasing data from storage devices. There can be many
reasons for deleting data such as system crash, accidental deletion, and illegal
deletion by hackers/mischief mongers. When data is deleted from storage media,
only the status (address entry) of data is changed and that space is shown empty
to the user without deleting data actually.
- Data recovery is the process of accessing deleted, lost or corrupted data from
storage devices. Deleted data can only be recovered when memory space of
deleted data has not been overwritten with new data.
The infernal devices: The computer system has the following internal devices:
● Motherboard: The motherboard is a circuit board of the computer system. All
the devices are connected with this board internally or externally. It provides
slots, connectors, and ports to connect devices.
● SMPS: It stands for switch mode power supply. It is attached with a power cable
from outside and connected with the motherboard through a connector.
● Hard Disk: A hard disk is the main storage device of the computer. It is
connected to the slot on the motherboard and to SMPS.
● CPU: The CPU is connected or attached to the CPU socket. On top of the CPU, a
fan is attached to provide cooling to the CPU.
● RAM: RAMs are attached to RAM slots on the motherboard.
● Ports: Ports allow one to attach external devices to the computer. These ports
are generally found at the backside of the cabinet. Ports have either halls or pins
to attach a device.
1.7 Software: Software is a set of programs that instruct hardware to what to and
how to do. It makes hardware functional to achieve a common objective. Some examples
of software are Windows 10, Macintosh, MySQL, MS Word, Excel, Games etc.
Types of software:
1. System software
2. Application software
1. System Software: System software manages computer systems. It is software
that controls and coordinates all internal activities of a computer system.
7. Python Tokens:-
Token is the smallest unit of any programming language. It is also known as Lexical Unit.
Types of token are
i. Keywords
ii. Identifiers (Names)
iii. Literals
iv. Operators
v. Punctuators
7.1 Keywords:- Keywords are reserved words. Each keyword has a specific meaning to
the Python interpreter. As Python is case sensitive, these cannot be used as identifiers,
variable name or any other purpose keywords must be written exactly as given below:-
7.3 Literals/ Values:- Literals are often called Constant Values. Python permits following
types of literals -
a. String literals - “Rishaan”
b. Numeric literals – 10, 13.5, 3+5i
c. Boolean literals – True or False
d. Special Literal None
e. Literal collections
7.4 Operators:- An operator is used to perform specific mathematical or logical
operations on values. The values that the operator works on are called operands. Python
supports following types of operators -
Unary Operator
•Unary plus (+)
•Unary Minus (-)
•Bitwise complement (~)
•Logical Negation (not)
Binary Operator
•Arithmetic operator (+, -, *, /, %, **, //)
•Relational Operator(<, >, <=, >=, ==,!)
•Logical Operator (and, or)
•Assignment Operator (=, /=, +=, -=, *=, %=, **=, //=)
•Bitwise Operator (& bitwise and, ^ bitwise xor,|bitwise or)
•Shift operator (<< shift left, >> shift right)
•Identity Operator (is, is not)
•Membership Operator (in, not in)
7.5 Punctuators:-
Punctuators are symbols that are used in programming languages to organize sentence
structure, and indicate the rhythm and emphasis of expressions, statements, and
program structure. Common punctuators are: „ “ # $ @ []{}=:;(),
8. Variable:-
· Variables are containers for storing data values.
· Unlike other programming languages, Python has no command for declaring a
variable.
· A variable is created the moment you first assign a value to it.
Example:-
x5
y "John"
print(x)
print(y)
· Variables do not need to be declared with any particular type and can even change
type after they have been set.
x 4 # x is of type int
x "Sally" # x is now of type str
print(x)
· String variables can be declared either by using single or double quotes:
x "John"
# is the same as
x 'John'
Variable Names
A variable can have a short name (like x and y) or a more descriptive name (age, carname,
total_volume).
Rules for Python variables:
· A variable name must start with a letter or the
· underscore character
· A variable name cannot start with a number
· A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ )
· Variable names are case-sensitive (age, Age and AGE are three different variables)
Output Variable:-
The Python print statement is often used to output variables. To combine both text and a
variable, Python uses the , character:
x "awesome"
print("Python is " , x)
Display Multiple variable:-
x "awesome“
y=56
print(“Value of x and y is=" ,x,y)
9. Data Type:-
Every value belongs to a specific data type in Python. Data type identifies the type of data
which a variable can hold and the operations that can be performed on those data.
() Parentheses left-to-right
** Exponent right-to-left
* / % Multiplication/division/modulus left-to-right
+ – Addition/subtraction left-to-right
or Logical OR left-to-right
= Assignment
+= -= Addition/subtraction assignment
*= /= Multiplication/division assignment
right-to-left
%= &= Modulus/bitwise AND assignment
^= |= Bitwise exclusive/inclusive OR assignment
<<= >>= Bitwise shift left/right assignment
12. Comments in python:- Comments are non-executable statements of python. It
increases the readability and understandability of code.
Types of comment –
Example:-
Name input (“Enter your name : ”)
Marks int(input (“Enter your marks ”))
print(“Your name is ”, Name)
print(“You got ”, Marks, “ marks”)
14. Debugging:- Debugging is a process of locating and removing errors from a program.
Types of errors:
a. Compile Time Error: (i) Syntax Error (ii) Semantics Error
b. Run Time Error
c. Logical Error
a. Compile Time Error: Compile time errors are those errors that occur at the time of
compilation of the program. There are two types of compile time errors:
i. Syntax Error: These errors occur due to violation of grammatical rules of a
programming language.
Example:
x=10
y=20
if(x<y):
Print(“a is greater than b”) # Syntax error, P is capital in Print statement
b. Semantics Error: Semantic errors occur when the statements written in the
program are not meaningful.
Example:
a=10
b=20
a+b = c # expression cannot come on the left side of the assignment operator
b. Run Time Error: Errors that occur during the execution or running the program are
known as run time errors. When a program “crashes” or “abnormally terminated” during
the execution, then these type errors are run time errors.
Example: When a loop executes infinite time.
a=1
while a<5: # value of a is always less than 5, infinite loop
print(a)
a=a-1
c. Logical Error: These types of errors occur due to wrong logic. When a program
successfully executes but giving wrong output, then it is known as logical error.
Example:
a=10
b=20
c=30
average=(a+b+c)/2 # wrong logic to find the average
print(average)
OUTPUT:
30.0
The purpose of the exception handling mechanism is to provide means to detect and
report an exceptional circumstance, so that appropriate action can be taken.
Exception handling in python can be done using try and except blocks.
Syntax:
try:
# Code that may generate an exception
except:
# Code for handling the exception
Example:
num1=int(input(“Enter first number :”))
num2=int(input(“Enter second number: “))
try:
r=num1/num2
print(“Result is :”, r)
except:
print(“Divided by zero”)
OUTPUT:
Enter first number : 30
Enter second number: 0
Divided by zero
2.2 Python Control Statements
In any programming language a program may execute sequentially, selectively or
iteratively. Every programming language provides constructs to support Sequence,
Selection and Iteration. In Python all these constructs can broadly be categorised in 2
categories.
If statements
This construct of a python program consists of one if condition with one block of
statements. When the condition becomes true then executes the block given below it.
Syntax:
if ( condition):
Statement(s)
Example:
age=int(input(“Enter Age: “))
if ( age>=18):
print(“You are eligible for vote”)
if(age<0):
print(“You entered Negative Number”)
if - else statements
This construct of a python program consists of one if condition with two blocks. When
the condition becomes true then executes the block given below it. If the condition
evaluates the result as false, it will execute the block given below else.
Syntax:
if ( condition):
Statement(s)
else:
Statement(s)
Example
age=int(input(“Enter Age: “))
if ( age>=18):
print(“You are eligible for vote”)
else:
print(“You are not eligible for vote”)
Nested if statements
It is the construct where one if condition takes part inside of another if condition. This
construct consists of more than one if condition. Block executes when the condition
becomes false and the next condition evaluates when the first condition becomes true.
So, it is also a multi-decision making construct.
Syntax:
if ( condition-1):
if (condition-2):
Statement(s)
else:
Statement(s)
Example:
num=int(input(“Enter Number: “))
if ( num<=0):
if ( num<0):
print(“You entered Negative number”)
else:
print(“You entered Zero ”)
else:
print(“You entered Positive number”)
Python Iteration Statements
The iteration (Looping) constructs mean to execute the block of statements again and
again depending upon the result of condition. This repetition of statements continues till
condition meets True result. As soon as the condition meets a false result, the iteration
stops.
Python supports following types of iteration statements
1. while
2. for
Four Essential parts of Looping:
i. Initialization of control variable
ii. Condition testing with control variable
iii. Body of loop Construct
iv. Increment / decrement in control variable
Syntax:
Initialization of control variable
while (condition):
…………………..
Updation in control variable
..…………………
Syntax:
range( start value, stop value, step value )
Where all 3 parameters are of integer type
Note: The Lower Limit is included but Upper Limit is not included in result.
Example
range(5) => sequence of 0,1,2,3,4
range(2,5) => sequence of 2,3,4
range(1,10,2) => sequence of 1,3,5,7,9
range(5,0,-1) => sequence of 5,4,3,2,1
range(0,-5) => sequence of [ ] blank list
(default Step is +1)
range(0,-5,-1) => sequence of 0, -1, -2, -3, -4
range(-5,0,1) => sequence of -5, -4, -3, -2, -1
range(-5,1,1) => sequence of -5, -4, -3, -2, -1, 0
Example
a=int(input("Enter first Number: "))
b=int(input("Enter Second Number: "))
if(b==0):
pass
else:
print("a/b=",a/b)
Jumping Statements
● break
● continue
break Statement
The jump- break statement enables you to skip over a part of code that is used in a loop
even if the loop condition remains true. It terminates to that loop in which it lies. The
execution continues from the statement which finds the loop terminated by break.
Continue Statement
Continue statement is also a jump statement. With the help of a continue statement, some
of the statements in the loop skipped over and started the next iteration. It forcefully stop
the current iteration and transfers the flow of control at the loop controlling condition.
2.3 LIST
Definition : A List is a collection of comma separated values within a square bracket.
Items in a list need not to be the same.
Features of list
• A List is used to store a sequence of values / items.
• All Elements of a list are enclosed in [ ] square brackets.
• Items / values are separated by comma.
• Lists are mutable (changeable) in python.
Output
Enter a set of numbers 4,7,5,6,9,2
Tuple is(4,7,5,6,9,2)
List is=[4,7,5,6,9,2]
List Indexing,
List1 [12, 3, 43, 23, 33, 65]
Accessing elements from a list
A M I T J A I N
0 1 2 3 4 5 6 7 8
print(List1[-2:-5]) []
1. Append command
append( ) is used to add only one element at
a time.
ListF [44, 55]
ListF # [44, 55]
ListF.append(77)
ListF # [44, 55, 77]
ListF.append(88,88) # Error
ListF.append([88, 99]) # [44, 55, 77, [88, 99]]
2. Extend command
extend( ) is used to add one or more
elements
ListF [44, 55]
List F # [44, 55]
ListF.extend(77) # Error
ListD[2] # 56
ListD[2] 1000 # 56
ListD[2] # 1000
ListD # [36, 46, 1000, 66, 76]
ListD[2:3]400,500 # [36, 46, 400, 500, 66, 76]
METHODS / FUNCTIONS
E.g. L1=[23,12,43,23,5,34]
L2=[‘K’, ‘V’, ‘S’]
1 index(item) L1.index(43) 2
To display index of an
item
2 insert(index, item) L2.insert(1, ‘A’) ['K','A','V','S']
To add an item at given
index
3 reverse() L2.reverse() [‘S’,‘V’,‘A’,‘K’]
Reverse the order of
elements
4 len(List) len(L1) 6
Returns length of list
9 min(list) min(L1) 5
Returns minimum value
2.4 DICTIONARY
Key points: -
- Python Dictionaries are a collection of some key:value pairs.
- Python Dictionaries are unordered collection
- Dictionaries are mutable means values in a dictionary can be changed using its key
- Keys are unique.
- Enclosed within brace { }
get( ) method # Trying to access keys which doesn't exist returns None
print(my_dict.get('address'))
# KeyError
print(my_dict['address'])
Output: -
Jack
26
None
Traceback (most recent call last):
File "<string>", line 15, in <module>
print(my_dict['address'])
KeyError: 'address'
Changing and Adding # Changing and adding Dictionary Elements
Dictionary elements my_dict {'name': 'Jack', 'age': 26}
# update value
my_dict['age'] 27
print(my_dict)
# add item
my_dict['address']= 'Downtown'
print(my_dict)
Output: -
{'name': 'Jack', 'age': 27}
{'name': 'Jack', 'age': 27, 'address': 'Downtown'}
Removing elements # Removing elements from a dictionary
from Dictionary squares {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
pop( ) method # remove a particular item, returns its value
print(squares.pop(4))
print(squares)
Output: -
16
{1: 1, 2: 4, 3: 9, 5: 25}
(5, 25)
{1: 1, 2: 4, 3: 9}
{}
len() – Finding dict={'Name':'Aman','Age':3}
number of items in print("Length: - ", len(dict))
dictionary OUTPUT
Length:- 2
keys() - returns all the x=dict(name=“Aman",age=37,country=“India")
available keys print(x.keys())
OUTPUT
dict_keys(['country','age','name'])
values()- returns all x=dict(name=“Aman",age=37,country=“India")
the available values print(x.values())
OUTPUT
dict_values(['India',37,'Aman'])
items()- return the list x=dict(name="Aman",age=37,country="India")
with all dictionary print(x.items())
keys with values. OUTPUT-
dict_items([('country','India'),('age',37),('name','Aman')])
update()- used to x=dict(name="Aman",age=37,country="India")
change the values of a d1=dict(age=39)
key and add new keys x.update(d1,state="Rajasthan")
print(x)
OUTPUT-
{'country':'India','age':39,'name':'Aman','state':'Rajasthan'}
fromkeys()i- is used keys={'a','e','i','o','u'}
to create dictionary value="Vowel"
from keys vowels=dict.fromkeys(keys,value)
print(vowels)
OUTPUT-
{'i':'Vowel','u':'Vowel','e':'Vowel','a':'Vowel','o':'Vowel'}
copy()- returns a x=dict(name="Aman",age=37,country="India")
shallow copy of the y=x.copy()
dictionary. print(y)
OUTPUT->{'country':'India','age':37,'name':'Aman'}
Dictionary #Membership Test for Dictionary Keys
Membership Test squares {1: 1, 3: 9, 5: 25, 7: 49, 9: 81}
in print(1 in squares)
not in print(2 not in squares)
print(49 in squares)
Output -
True
True
False
Iterating Through a # Iterating through a Dictionary
Dictionary squares {1: 1, 3: 9, 5: 25, 7: 49, 9: 81}
for i in squares:
print(squares[i])
Output-
1
9
25
49
81
Unit 3: Database concepts and the Structured
Query Language
- Database Concepts: Introduction to database concepts and its need, Database
Management System.
- Relational data model: Concept of domain, tuple, relation, candidate key, primary
key, alternate key
- Advantages of using Structured Query Language, Data Definition Language, Data
Query Language and Data Manipulation Language, Introduction to MySQL,
creating a database using MySQL, Data Types
- Data Definition: CREATE TABLE
- Data Query: SELECT, FROM, WHERE.
- Data Manipulation: INSERT
Three Important Properties of a Relation :In relational data model, following three
properties are observed with respect to a relation which makes a relation different from
a data file or a simple table.
What is MySQL?:
MySQL is a open source Relational Database Management System. MySQL is very fast
reliable and flexible Database Management System. It provides a very high performance
and it is multi threaded and multi user Relational Database management system.
MySQL Features
1. MySQL are very fast and much reliable for any type of application.
2. MySQL is very Lightweight application.
3. MySQL command line tool is very powerful and can be used to run SQL queries
against database.
4. MySQL supports indexing and binary objects.
5. It is allow changes to structure of table while server is running.
6. MySQL has a wide user base.
7. It is a very fast thread-based memory allocation system.
8. MySQL Written in C and C++ language.
9. MySQL code is tested with different compilers.
10. MySQL is available as a separate program for use in a client/server network
environment.
Advantages of MySql:
● Reliability and Performance : MySQL is very reliable and high performance
relational database management system. It can used to store many GB's of data
into database.
● Open Source: MySQL source code is available that's why now you can recompile
the source code.
● Cross-Platform support: MySQL supports more then twenty different platform
including the major Linux distribution .Mac OS X, Unix and Microsoft windows.
Keep in Mind That...
● SQL is not case sensitive in windows but it is if you use linux based environment.
● Semicolon after SQL Statements
1. DML commands: A DML is a language that enables users to access manipulated data
as organized by the appropriate data model.
● SELECT - extracts data from a database (DQL)
● UPDATE - updates data in a database Not part of our syllabus
● DELETE - deletes data from a database Not part of our syllabus
● INSERT INTO - inserts new data into a database
2. DDL commands: The DDL commands, as the name suggests, allow you to perform
tasks related to data definition. The DDL part of SQL permits database tables to be created
or deleted. The most important DDL statements in SQL are:
● CREATE DATABASE - creates a new database
● ALTER DATABASE - modifies a database Not part of our syllabus
● CREATE TABLE - creates a new table
● ALTER TABLE - modifies a table Not part of our syllabus
● DROP TABLE - deletes a table Not part of our syllabus
CHAR(size) Holds a fixed length string (can contain letters, numbers, and special
characters). The fixed size is specified in parenthesis. Can store up to
255 characters
Number types:
Data type Description
DECIMAL(size,d) A DOUBLE stored as a string , allowing for a fixed decimal point. The
maximum number of digits may be specified in the size parameter.
The maximum number of digits to the right of the decimal point is
specified in the d parameter
*The integer types have an extra option called UNSIGNED. Normally, the integer goes from an
negative to positive value. Adding the UNSIGNED attribute will move that range up so it starts at
zero instead of a negative number.
Date types:
Data type Description
The empty table can be filled with data with the INSERT INTO statement.
Halwani Oneer
Siddiqui Taimur
Prasad Kishan
SELECT * Example
Now we want to select all the columns from the "Persons" table. We use the following
SELECT statement:
SELECT * FROM Persons; // The asterisk (*) is a quick way of selecting all columns
Output:
P_Id LastName FirstName Address City
Surat
Srinagar
Now we want to select only the persons living in the city "Surat" from the table above.We
use the following SELECT statement:
SELECT * FROM Persons
WHERE City='Surat'
The result-set will look like this:
P_Id LastName FirstName Address City
= Equal
IN If you know the exact value you want to return for at least
one of the columns
Note: In some versions of SQL the <> operator may be written as !=
OR Operator Example
Now we want to select only the persons with the first name equal to "Taimur" OR the first
name equal to "Oneer":
We use the following SELECT statement:
SELECT * FROM Persons
WHERE FirstName='Taimur'
OR FirstName='Oneer'
The result-set will look like this:
P_Id LastName FirstName Address City
Next, we want to select the persons living in a city that contains the pattern "nes" from
the "Persons" table. We use the following SELECT statement:
SELECT * FROM Persons
WHERE City LIKE '%rat%'
The result-set will look like this:
P_Id LastName FirstName Address City
Next, we want to select the persons with a last name that starts with "S", followed by any
character, followed by "end", followed by any character, followed by "on" from the
"Persons" table.
We use the following SELECT statement:
SELECT * FROM Persons
WHERE LastName LIKE 'S_dd_ui'
The result-set will look like this:
P_Id LastName FirstName Address City
The IN Operator
The IN operator allows you to specify multiple values in a WHERE clause.
SQL IN Syntax
SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)
IN Operator Example
We use the following SELECT statement:
SELECT * FROM Persons
WHERE LastName IN ('Halwani','Prasad')
The result-set will look like this:
P_Id LastName FirstName Address City
Now we want to select the persons with a last name alphabetically between "Halwani"
and "Prasad" from the table above.
We use the following SELECT statement:
SELECT * FROM Persons
WHERE LastName
BETWEEN 'Halwani' AND
'Prasad'
The result-set will look like this:
P_Id LastName FirstName Address City
4.2 Immersive Experiences: Now movies are three dimensional, video games are also
being developed to provide immersive experiences to the player. Immersive experiences
allow us to visualize, feel and react by stimulating our senses. It enhances our interaction
and involvement, making them more realistic and engaging. Immersive experiences have
been used in the field of training, such as driving simulators , flight simulators and so on.
● Virtual Reality – Virtual Reality (VR) is a three-dimensional, computer-generated
situation that simulates the real world. The user can interact with and explore that
environment by getting immersed in it while interacting with the objects and
other actions of the user.
● Augmented Reality – The term “augmented reality” refers to the superimposition
of computer-generated perceptual information over the actual physical
surroundings (AR). Consider Pokémon Go as an illustration, where players look
for animated characters that appear in their real-world surroundings on their
phone or tablet.
4.3 Robotics: A robot is essentially a machine that can complete one or more activities
accurately and precisely on its own. A robot is programmable by a computer, which
implies it can obey commands supplied by computer programmes, unlike other devices.
Mars Exploration Rover (MER) is a robotic space mission launched by NASA to
learn more about the planet Mars.Sophia is a humanoid robot that mimics human
movements and facial expressions and uses artificial intelligence, visual data processing,
and facial recognition.
An unmanned aircraft called a drone can be remotely piloted or can fly on its own
using software-controlled flight plans in embedded systems in conjunction with onboard
sensors and GPS.
4.4 Big Data: Every day, over 2.5 quintillion bytes of data are generated, and the rate is
rising due to the Internet of Things’ ongoing development (IoT). As a result, big data, data
sets with a large volume and high level of complexity are created.
Such data cannot be handled and analyzed using conventional data processing
methods because it is not only large but also unstructured, such as our posts,
conversations, and instant messages, as well as the pictures.
This data is highly valuable in the businesses, So, there is a strong focus on
developing tools and processes to process and analyze big data.
Characteristics of Big DataThere are five different types of characteristics of Big Data –
1. Volume – Size presents the biggest challenge for large data. It will be challenging
to process a certain dataset if it is large.
2. Velocity – Velocity is the term used to describe the speed with which information
must be processed after being input into a system. For example, Amazon record
every click of the mouse when the shoppers are browsing on its website.
3. Variety – All the organized and unstructured data that could be produced by
either people or machines is referred to as variety in big data.
4. Veracity – Big data can occasionally be inaccurate, distorted, noisy, or contain
errors. It can also have problems with the methods used to obtain the data.
Veracity relates to how reliable the data is.
5. Value – Big data is more than just a large collection of data; it also contains hidden
patterns and insightful information that may be highly valuable to businesses.
4.5 Data Analytics: The practice of analysing datasets to make judgments about the
information they contain is known as data analytics. You can take raw data and use data
analytical tools to find patterns and gain insightful conclusions from it.
“Data analytics is the process of examining data sets in order to draw conclusions
about the information they contain, with the aid of specialised systems and software.
4.7 Web of Things (WoT) Internet of Things allows us to interact with different devices
through the Internet with the help of smartphones or computers, Web of Things (WoT)
allows use of web services to connect anything in the physical world, besides human
identities on the web. It will pave the way for creating smart homes, smart offices, smart
cities and so on.
4.8 Sensors: Sensors are frequently used as monitoring and observing components. The
development of IoT is being greatly aided by the evolution of smart electronic sensors. It
will result in the development of fresh, intelligent systems with sensors.
A smart sensor is a device that receives input from the physical world and uses
internal computer power to carry out predetermined tasks when a certain input is
detected. The data is then processed before being transmitted.Smart CitiesA smart city
use the information and communication technologies (ICT), for creating, implementing,
and promoting sustainable development methods to handle the issues of expanding
urbanisation.
4.9 Smart City: handle transportation systems, power plants, water supply networks,
waste management, law enforcement, information systems, schools, libraries, hospitals
and other community services work in unison to optimise the efficiency of city operations
and services through the information and communication technologies.
4.10 Cloud Computing: Cloud computing is a new trend where computer-based services
are supplied via the Internet or the cloud and are accessible to the user from any location
using any device.
Cloud computing is the distribution of computer services over the Internet (“the
cloud”), including servers, storage, databases, networking, software, analytics, and
intelligence.Cloud Services.
There are three standard models to categorise different computing services delivered
through the cloud.
1. Infrastructure as a Service (IaaS)
2. Platform as a Service (PaaS)
3. Software as a Service (SaaS)
1. Infrastructure as a Service (IaaS) – IaaS is a particular kind of cloud
computing service that provides necessary computation, storage, and networking
resources on demand for example different types of computer infrastructure, such
as servers, virtual machines (VM), storage and backup facilities, network
components, operating systems, or any other hardware or software, can be offered
by IaaS providers.
4.11 Grid Computing: Grid computing refers to a network of computers from various
administrative domains cooperating to complete a task. Grid computing enables simple
completion of complicated tasks that may be intractable for a single computer machine.
Grid can be of two types:
1. Data grid: used to manage large and distributed data having required multi-user
access
2. CPU or Processor grid: where processing is moved from one PC to another as
needed or a large task is divided into subtasks and divided to various nodes for
parallel processing.
Mar
Q SECTION A
ks
What was the name of the first computer designed by Charlse Babbage?
A. Analytical Engine
1 B. Difference Engine 1
C. Colossus
D. ENIAC
What is a database?
A. Organized collection of information that cannot be accessed, updated, and
managed
3 B. Collection of data or information without organizing 1
C. Organized collection of data or information that can be accessed, updated, and
managed
D. Organized collection of data that cannot be updated
Which statement does not show any error after execution? Given L=[1,2,3,4]
A. print(L+L)
6 B. print(L*L) 1
C. print(L-L)
D. All of the mentioned
SQL INSERT statement adds ............... records to any single table in a relational
database
A. One
8 B. One or More 1
C. only two
D. None of Above
Which line of code correctly adds an item to the fruits dictionary with a key of
'Blackberry' and a value of 20?
fruits = {'Apples':1, 'Bananas':4, 'Grapes':17, 'Oranges':14}
12 A. fruits['Blackberry'] = 20 1
B. add fruits['Blackberry'] = 20
C. insert 'Blackberry':20 in fruits
D. fruits[20] = 'Blackberry'
For each attribute of a relation, there is a set of permitted values, called the ________
of that attribute..
A. Relation
15 1
B. Domain
C. Tuple
D. Degree
Internet of Things (IoT), Sensors, Smart cities, Cloud Computing and Cloud Services
(SaaS, IaaS, PaaS); Grid Computing, Block chain technology.
A: In Machine Learning, computers have the ability to learn from data using
18 1
statistical techniques.
R: After successive training, ML Models are used to make predictions about new
and unknown data.
SECTION B
SECTION C
27 Write a program to take user input and find number is odd or even 3
Artificial Intelligence (AI) is a discipline that aims to create robots that are
intelligent enough to do jobs that are typically performed by humans only. Identify
aspects which are still beyond the capabilities of artificial intelligence
29 OR 3
A new initiative named PMSHREE is being implemented in various schools across
India. The scheme is to make the IOT enabled, smart and model schools. Please
suggest three iOT enabled solutions to make the school smart.
SECTION D
Write a python program to create a dictionary where the keys are numbers
(between 1 to 10) and the values are sum of the first keyth (1 to key) natural
numbers.
31 OR 5
a) Define a Dictionary with an example in respect of Python?
b) Write down any two characteristics of a python Dictionary?
c) What is the purpose of the dict() method?
Write a SQL statement to create a table jobhistory in job database with following
structure
+------------+--------------+------+-----+---------+-------+
32 5
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+---------+-------+
| JOB_ID | varchar(10) | NO | | | |
| JOB_TITLE | varchar(35) | NO | | NULL | |
| MIN_SALARY | decimal(6,0) | YES | | NULL | |
| MAX_SALARY | decimal(6,0) | YES | | NULL | |
+------------+--------------+------+-----+---------+-------+
Write Sql statement for following
a. Create a database job
b. Before creation of table open the newly created database job
c. create a table jobhistory with above structure
d. Which field can be created as Primary key
e. What will be the degree of table/relation jobhistory
Answer the question (a) to (e) based on the table, PLAYER given below:
Player
PID PName Gender Game Rank
Mr. Tushar Kapoor, is a games teacher. He needs to prepare a list of students who
are selected for regional level sports meets. later he needs to perform some actions
on the list so prepared. He is of the view that the task can be accomplished easily
using python lists data structure. Help him to perform the following task using lists
in Python programming language.
34 4
a. create a list named ‘Regional’ with the following values :- ‘Amrit’, ‘Kanika’,
‘Salman’, ‘Vivek’, ‘Anita’, ‘Vipin’
b. print the number of students in the ist.
c. remove the student at the third index.
d. Display last three elements in the list
Mr Vanaram has opened a coaching institute in his home city Yalahanka. He has a
bit of experience with database design but forgot a few things here and there. He
has called his best buddy Ramanatham for help. Let’s assume you are Ramnatham,
help out your friend to set up and test the database thus created.
Course
C_ID F_ID Cname Fees
a) Help Vanaram by filling out the missing bits in the table creation process:
CREATE ____(i)____ Course(
C_ID CHAR(3),
F_ID ___(ii)____,
Cname VARCHAR (20),
Fees INT);
b) Vanaram: Hey Rama, would you please write the INSERT query for the first
row? I’ll follow and write the subsequent one myself.
c) Vanaram: I want to see the data of the table but the query: SELECT ALL
FROM TABLE Course; is not working. Can you fix it?
KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION
QUESTION PAPER (SET - 02)
CLASS: XI SESSION: 2022-23
INFORMATION PRACTICES (CODE 065)
TIME: 3 HRS M M: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 marks each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
Internal choice is given in two questions (19 and 23).
5. Section C has 05 Short Answer type questions carrying 03 marks each.
Internal choice is given in two questions (29 and 30).
6. Section D has 03 Long Answer type questions carrying 05 marks each.
Internal choice is given in two questions (31 and 33).
7. Section E has 02 questions carrying 04 marks each.
One internal choice is given in Q 34 and 35 against part c only.
8. All programming questions are to be answered using Python Language only.
Q. N. SECTION A Marks
___________ deals with the interaction between humans and computers using human
spoken languages, such as Hindi, English, etc.
A. Data Science
4 1
B. Neuroscience
C. Natural Language Processing
D. All of the above
Which one is the command to add a new column in an already existing relation in SQL?
A. Add
5 1
B. Alter
C. Insert
D. Change
A column is declared with char (10) size, and assigned 4 characters only. How many
total characters will this column occupy?
A. 4
11 1
B. 5
C. 10
D. 11
Which of the following clauses is used in the SQL select statement to filter rows to be
included in the query result.
A. Order By
13 1
B. Group by
C. Having
D. Where
In the relational model, the number of attributes and number of tuples of a relation
are termed as _________ and _________ respectively.
A. cardinality, domain
15 1
B. domain, degree
C. degree, cardinality
D. cardinality, degree
SECTION B
An organization named Gaurav wants to put all the data in the form of records. The
20 records are stored in a table and tables are stored in a database. Which DDL command 2
is used to create a database name Gaurav? Write down the SQL Statement to create
the database.
21 Write down the full form of following i/o devices: OCR, MICR, OMR, VR 2
Consider the table Student {S_Id, S_Name, S_Age, S_Class, S_Fee}. Write the command
to display S_Id, S_Name and S_Class of the students who are studying in class 5, 9, 10
23 and 12. 2
OR
What is the purpose of the INSERT command? Explain briefly with an example?
SECTION C
Differentiate between generic and special purpose software. Give an example in each
26
case. 3
Write a program to check if the number is positive or negative or zero and display an
27 3
appropriate message. (input: num=3.4, 0 and -4.5)
28 Write a python program to check whether the given character is a vowel or not. 3
A news channel broadcasts information on a wide range of topics. The news channel
permits people to submit breaking news, which is subject to verification by the
channel’s reporters. It may be difficult to distinguish between real news and fake
news, which can lead to confusion among readers and threaten a news organization’s
reputation. Which domain is used to detect fake news so that the audience has a high
level of trust in the news channel? Write in brief about this domain.
OR
29 A company interested in cloud computing is looking for a provider who offers a set of 3
basic services such as virtual server provisioning and on-demand storage that can be
combined into a platform for deploying and running customized applications. What
type of cloud computing model fits these requirements?
a) Platform as a Service
b) Software as a Service
c) Infrastructure as a Service
Also, Explain your choice.
Mr. Khan wants to view the structure of an existing table - STUDENT in a database
SCHOOL.So he started Mysql, write down the sequence of the commands he should
use as he is not sure about the name of the table also.
30 3
OR
Mitali is confused with the terms Domain, Tuple and Attribute. Help her to understand
the terms with a suitable example of each.
SECTION D
Write a python program to count the frequency of each character using a dictionary
of a string (string should be entered by the user).
31 OR 5
Explain the use of get() and pop() methods in respect of Python Dictionary with
examples.
Write a SQL statement to create a table customer in shop database with following
structure
+---------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------------+------+-----+---------+-------+
| ID | int(11) | NO | | | |
| NAME | varchar(20) | NO | | | |
| AGE | int(11) | NO | | | |
32 5
| ADDRESS | char(25) | YES | | NULL | |
+---------+---------------+------+-----+---------+-------+
Write SQL statements for following
a. Create a database shop
b. Before creation of table open the newly created database shop
c. Create a table customer with above structure
d. Which field can be created as Primary key
e. What will be the degree of table/relation customer
Answer the question (a) to (e) based on the table, Book given below:
Book
BNo Title Author Date_Purchased Price
SECTION E
Miss Anita Bhati is a mathematics teacher. She often needs to evaluate her students
and analyze her scores to plan her teaching pedagogies. She has decided to use
technology for the same. Help her to perform the following task (a) to (d) using lists
in Python programming language.
a. Create a list named ‘scores’ having following values: 10, 7, 9, 11, 12, 15, 19, 20, 18,
34 4
4
b. Add the following values in the list using a single command.
15, 20, 45
c. Print the name of the value at index number 3.
d. Display the minimum sore from the list.
Mark
Q SECTION A
s
What is DBMS?
A. DBMS is a collection of queries
3 B. DBMS is a high-level language 1
C. DBMS is a programming language
D. DBMS stores, modifies and retrieves data
Process of accessing or fetching data from storage device as per requirement is known as
:-
A. Data Retrieval
7 1
B. Data Capturing
C. Data Recovery
D. Data Backup
How is Column wise insertion of data different from simply passing values to a table?
A. Column wise data leads in populating data on an optional basis i.e. whether the
user wanted to insert data in a column or not.
8 B. We can’t pass value to a table without mentioning column names in an insert 1
statement.
C. Passing values to a table without column names is always safe.
D. None of the above.
MySQl is-
A. Proprietary Software
11 B. Free and Open Source Software 1
C. Shareware
D. None
An attribute in a relation is a foreign key if the ________ key from one relation is used as an
attribute in that relation.
A. Candidate
15 1
B. Alternate
C. Super
D. Primary
A: The data in Big Data is not only voluminous, but also unstructured like posts, instant
messages, chats, photographs, tweets, blog articles, news items, comments, audio/video
18 chats, etc. 1
R: Such data can be analyzed using traditional data analysis tools like DBMS, spreadsheets
etc.
SECTION B
if a or b and c:
print ("PYTHON PROGRAMMING")
else:
print ("python programming")
20 Explain CREATE command also Write down the syntax to create a table. 2
Consider the table Student {S_Id, S_Name, S_Age, S_Class, S_Fee}. Write the command to
display S_Id, S_Name and S_Age of the students whose Age is in the range 10 to 16 (both
inclusive).
OR
23 2
A table EMP has attributes EmpID, First_Name, Last_Name, Salary. Write down command
to add following data in the EMP table
i) 1111, NAVNEET, SHARMA, 60000
ii) 2222, NARESH, 50000
A gigabyte is equal to
A. 1024 bytes
25 B.1024 megabytes 2
C. Million megabytes
D. Thousand kilobytes
SECTION C
Write a python program to display the sum of first n natural numbers (Note: Value of n
28 3
should be entered by the user).
i) Write down the name of the SQL command by which one can modify the structure of a
table? A table PRODUCT has attributes PID, PNAME, PRICE, DESCRIPTION.
30 ii) Write a command to add a new attribute QUANTITY of Integer type in this table? 3
OR
What are the constraints? Explain any two constraints.
SECTION D
Write a python program to create a dictionary called fruits with below data:
"Banana":60,
"Apple":80,
"Orange":55,
"Pineapple":80
31 Using loop, print out all the key along with its price and in the following format: 5
Fruit = Apple and Price = 2
Also print the total amount one would need to purchase all of your fruits.
OR
What is the purpose of pop(), popitem(), clear() methods used with dictionaries in
python?
Write the queries (a) to (e) based on the table given below:
Investor:
ID Name Age Village Income
SECTION E
Ms. Preeti Sexena is a Class Teacher of VIII. She often needs to maintain the health records
of her students and analyze her scores to plan her pedagogies. She has decided to use
technology for the same. Help her to perform the following task (a) to (d) using lists in
Python programming language.
34 4
a. Create a List named - height with the following values : 4
b. sort the elements of the list in ascending order
c. Find how many times the value 4.4 appeared in the list.
d. Display the maximum value from the list.
Huma is a sports fan. She wants to make a career as a sports journalist. She was given a
job as a sports columnist for her college magazine. She decided to present a featurette
about the Arjuna Award and the award receivers in the year 2022. She consulted her
friend Semim for preparation of the database. Here’s the conversation between them.
Huma: Hello Semim, would you please help me out with this project?
Semim: Sure. I would love to be a part of it. What would I get in return?
Huma: Garma Garam Jalebis made by Amma.
Semim: Wow, you sure know how to treat your bestie. Cheppa (tell me), what are your
queries?
Huma: Hmmm.. first of all we need to collect the data from https://pib.gov.in/, an official
35 4
website of the Ministry of Youth Affairs and Sports. We will then create a database and
various tables to perform the analysis.
Semim: Okay, let’s do it.
(They successfully obtained the data from the website and created the database and
tables.)
Huma: Thanks a ton but wait can you tell me how do I access this data when I am all by
myself?
Q SECTION A
Which of the following processes is used to reinstall/restore data from a copy when
the original data has been lost?
A. Update
1 B. Backup 1
C. Recovery
D. None of these
Network of interconnected items with integrated sensors that can gather and
transmit data in real time is known as the _______.
A. Internet of Things
4 1
B. Big Data
C. Model
D. None of the above
How can you insert a new row into the “STORE” table
A. INSERT ROW (1,‟ RAM SINGH‟) INTO STORE;
B. INSERT VALUES (1,‟ RAM SINGH‟) INTO STORE;
8 1
C. INSERT INTO (1,‟ RAM SINGH‟) STORE;
D. INSERT INTO STORE VALUES (1,‟ RAM SINGH‟)
The ___________ acts as an interface between the device and the operating system.
A. Device Conductor
10 B. Device Driver 1
C. Hardware Drive
D. Hardware Conductor
Mr. Rajan wants to add a new attribute in an existing table in MySql, which
command he should use : -
A. DESCRIBE
16 1
B. ALTER TABLE
C. DELETE
D. INSERT ATTRIBUTE
A: Web of Things (WoT) allows the user to browse the web using anything in the
physical world like a toaster, an oven or a fan.No need of a phone or a PC.
18 R: The ‘Internet of Things’ is a network of devices that have embedded hardware 1
and software to communicate (connect and exchange data) with other devices on
the same network.
SECTION B
Consider the table Employee {EId, EName, Age, Designation, Salary, Department}.
Write the command to display EId, EName, Designation and Department of the
employees whose name start with A and department is IT.
OR
23 2
State True or False in reference with INSERT INTO command of SQL?
i) INSERT is not a part of DDL?
ii) While adding tuples using the INSERT command, one must specify values for all
the attributes of the table.
SECTION C
Write a python program to print the factorial of a number (Note: number should be
28 3
entered by the user).
29 The Air LMN Airlines Group want to train pilot. The trainees can take the headset 3
home and train for as long as they need. This includes them familiarizing the
aircraft and 360-degree walkarounds.What kind of emerging trend is useful here
OR
CBSE has started to provide the digital copy of the marksheets online. Which
technology can be used to provide the decentralized data sharing architecture?
One in which safety and security of the transactions are ensured because all the
members in the network keep a copy of the file and so it is not possible for a single
member of the network to make changes or alter data. Can the same tech be applied
in other areas? (If yes, Write the names of two such areas)
Explain the concept of Primary Key, Candidate Key and Alternate Key.
SECTION D
Write the queries (a) to (e) based on the table given below:
Table: Professor
P_ID PName Department Tinkha
SECTION E
Ms. Anjana is a Super Store Manager. She often needs to maintain the records of
products in the store and analyze data to plan her sales targets. She has decided to
use technology for the same. Help her to perform the following task (a) to (d) using
lists in Python programming language.
34 a. Create a List named - ‘price’ with the following values 780, 390, 110,145, 4
224, 390, 165, 390, 444, 254, 77
b. remove the last added element in the list.
c. Delete the first occurance of 390 from the list.
d. Sort the elements of the list in descending order.
Hemachndra Rawat likes to play competitive video games and he also records his
gaming session on twitch. One day his cousin Shrea calls him to help her out with a
school project about esports. Here’s the snippet of their conversation.
Shrea: I would like to create a digital database about recent and popular game titles.
Can you help me out with that?
35 Hemachandra: Why not. Just let me know what the details are you looking for. 4
Shrea: I want to know the names of popular games, their production companies,
Genre, Download count, followers on social media etc.
Hemachandra: I think I can work with that. I’ll create a database and a few tables,
you can populate them with the data later on.
Shrea: Great. Can you tell me how to check the results?
Hemachandra: Of course. I’ll tell you how to create and manage your database.
We will use MySQL for this purpose.
They created the database and the tables and now Shrea is ready with some queries
to test the database. Answer her query on Hemchandra’s behalf:
Q SECTION-A Marks
A relation is having 5 columns and 6 rows, find out the Degree and
Cardinality of this Relation-
A. 1 Degree and 1 Cardinality
9 1
B. 6 Degree and 5 Cardinality
C. 5 Degree and 6 Cardinality
D. 2 Degree and 2 Cardinality
A: Jump statements in python are used to alter the flow of a control statement like
17 you want to skip a part of a loop or a condition 1
R: break, continue and pause are three jump statements available in a python.
SECTION B
Differentiate append() and extend() methods used with lists? Illustrate with
22 2
an example of both?
Consider the table Employee {EId, EName, Age, Designation, Salary, Department}.
Write the command to display EId, EName, Age, Designation and Department of
the employees whose Age is greater than 18 or department is not HR.
23 OR 2
Name the command to add new tuples into a table? State the information one
needs before adding a new tuple into a table?
Differentiate between the interactive mode and script mode available with python
24 IDLE. 2
SECTION C
Write python code to convert the time given in minutes into hours and
27 3
minutes.
Write a python program to print the below shown pattern where no. of rows
should be entered by the user (Note: no. of rows should be less than equal to
20 else show error).
28 * 3
* *
* * *
* * * *
Mr. Anil Mohan is a computer teacher ,he want to explain about use of machine
learning through some example.Suggest any 3 suitable example or application
area where machine learning can be used.
OR
The new addition of the Apple watch has a feature called “Crash Detection”. Which
29 3
can send an SOS to the emergency contact and the emergency services. This can
be a life saving feature for many unfortunate people who otherwise lose their lives
due to the lack of immediate emergency support at the time of the need. The crash
detection algorithm needs data to process and identify the situation. How do you
think that data is provided to the algorithm? Can you list two such data/input
providers in a wearable?
SECTION D
Consider the below data, Write a python program to perform below tasks.
"Banana":60,
"Apple":80,
"Orange":55,
"Pineapple":80
(a) Print the list of values
(b) Remove 'Orange' from the dictionary
(c) Create the copy of the dictionary
(d) Update the price for Apple to 100
31 5
(e) Remove all the items from the dictionary
OR
Table SALE
PRODID QTY RATE AMOUNT
1 10 100 1000
2 5 50 250
32 5
a. Write sql commands create above table SALE with suitable datatype
b. Can we take the QTY column of SALE table as Primary Key? If no give reason
c. Which column is best suitable for applying Primary Key?
d. what is the cardinality of above table
e. what is the degree of above table
Write the queries (a) to (e) based on the table given below:
Course
C_ID F_ID Cname Fees
OR
33 Consider the table - RESTAURANT given below. Write the output for (i) to (iv) and 5
write sql query for question (v)
SNO NAME TYPE DOA COST
SECTION E
A shop called Rainbow Garments that sells school uniforms, maintains a database
SCHOOL_UNIFORM. It consisted of two relations — UNIFORM and PRICE. They
made UniformCode as the primary key for UNIFORM relations. Specify SQL
queries to rectify the following anomalies.
a) There’s a new product, a Handkerchief. The colors are Red and White. The
35 4
Price is Rs. 100. The PID is ‘hkcf2004’ and ‘hkcf2005’ respectively. Insert
the above data in the Relation Product(PID, Name, Color, SIze, Price).
b) Write down the query to check the table contents.
c) Write down the query to display all the products with size “S” and color
“Blue”.
KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION
Marking Scheme SET-1
CLASS: XI SESSION: 2022-23
INFORMATION PRACTICES (CODE 065)
TIME: 3 HRS M M: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 marks each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
Internal choice is given in two questions (19 and 23).
5. Section C has 05 Short Answer type questions carrying 03 marks each.
Internal choice is given in two questions (29 and 30).
6. Section D has 03 Long Answer type questions carrying 05 marks each.
Internal choice is given in two questions (31 and 33).
7. Section E has 02 questions carrying 04 marks each.
One internal choice is given in Q 34 and 35 against part c only.
8. All programming questions are to be answered using Python Language only.
Mar
Q Part-A
ks
What was the name of the first computer designed by Charlse Babbage?
A. Analytical Engine
B. Difference Engine
1 1
C. Colossus
D. ENIAC
Ans. B. Difference Engine
What is a database?
A. Organized collection of information that cannot be accessed, updated, and
managed
B. Collection of data or information without organizing
3 C. Organized collection of data or information that can be accessed, updated, 1
and managed
D. Organized collection of data that cannot be updated
Ans. C. Organized collection of data or information that can be accessed,
updated, and managed
Which statement does not show any error after execution? Given L=[1,2,3,4]
A. print(L+L)
B. print(L*L)
6 1
C. print(L-L)
D. All of the mentioned
Ans. A. print(L+L)
SQL INSERT statement adds ............... records to any single table in a relational
database
A. One
8 B. One or More 1
C. only two
D. None of Above
Ans. B. One or More
12 Which line of code correctly adds an item to the fruits dictionary with a key 1
of 'Blackberry' and a value of 20?
fruits = {'Apples':1, 'Bananas':4, 'Grapes':17, 'Oranges':14}
A. fruits['Blackberry'] = 20
B. add fruits['Blackberry'] = 20
C. insert 'Blackberry':20 in fruits
D. fruits[20] = 'Blackberry'
Ans. A. fruits['Blackberry'] = 20
For each attribute of a relation, there is a set of permitted values, called the
________ of that attribute..
A. Relation
15 B. Domain 1
C. Tuple
D. Degree
Ans. B. Domain
Internet of Things (IoT), Sensors, Smart cities, Cloud Computing and Cloud
Services (SaaS, IaaS, PaaS); Grid Computing, Block chain technology.
A: In Machine Learning, computers have the ability to learn from data using
18 statistical techniques. 1
R: After successive training, ML Models are used to make predictions about
new and unknown data.
Ans. (i) Both A and R are true and R is the correct explanation for A
Part-B
Ans.
errors in the code:
a,b=9,56
if(a<b) # : symbol is missing
print(‘a is smaller than b’) #indentation is missing
correct code:
a,b=9,56
19 2
if(a<b):
print(‘a is smaller than b’)
OR
What will be the output of following program
x=1234
while x%10:
x=x//10
print(x)
Ans.
123
12
1
0
Ans.
INSERT INTO PERSON VALUES(101,”Sandeep”, 9955882200)
Part-C
Write a program to take user input and find number is odd or even
Ans-
inp_num = input("Enter a number: ")
#Convert string to int
inp_num = int(inp_num)
27 if inp_num == 0: 3
print(inp_num, "is Even")
elif inp_num%2==0:
print(inp_num, "is Even")
else:
print(inp_num, "is Odd")
Artificial Intelligence (AI) is a discipline that aims to create robots that are
intelligent enough to do jobs that are typically performed by humans only.
Identify aspects which are still beyond the capabilities of artificial
intelligence
Ans: High processing power, emotional intelligence, it cannot learn to think
outside the box
OR
A new initiative named PMSHREE is being implemented in various schools
29 across India. The scheme is to make the IOT enabled, smart and model 3
schools. Please suggest three iOT enabled solutions to make the school smart.
Ans.
a) e-textbooks
b) Smart boards
c) Online tests using personal smart devices
d) Wifi sensors on classrooms doors
e) Sensors in buses to monitor their location
f) Wearables (watches or smart belts) for attendance monitoring
Ans
i) CREATE DATABASE
ii) Show Databases
iii) USE
30 3
OR
What do you understand by the term database? Write any four advantages of
using a database over the traditional file system.
Ans.
A database is an organized collection of structured information, or data,
typically stored electronically in a computer system.
Its advantages are data redundancy and inconsistency, data sharing, data
security and data integrity etc.
Part-D
Write a python program to create a dictionary where the keys are numbers
(between 1 to 10) and the values are sum of the first key th (1 to key) natural
numbers.
Ans.
my_dict = {}
31 5
sum = 0
for i in range(1, 11):
sum += i
my_dict[i] = sum
print(my_dict)
OR
a) Define a Dictionary with an example in respect of Python?
b) Write down any two characteristics of a python Dictionary?
c) What is the purpose of the dict() method?
Ans
a) Python Dictionaries are a collection of some key:value pairs enclosed
within {}.
Example - {‘Rollno’:101, ‘Name’: ’Jordan’, ’Age’:25}
b)
i) Dictionary is mutable but keys are immutable
ii)keys are unique
c)
dict() method is used to create a blank dictionary.
D1=dict()
Answer the question (a) to (e) based on the table, PLAYER given below:
Player
PID PName Gender Game Rank
Saniya Tennis
Mircha
OR
Consider the table -TICKET given below. Write the output for (i) to (iv) and
answer the question (v)
TKTN PNAME SOURCE DESTINATIO FARE
O N
ANS:
i.
TKTN PNAME SOURCE DESTINATION FARE
O
iv
PNAME
Vimal Kumar
Vickey Kaushal
Vikek Shah
v. 5
1 mark for correct output. ½ mark for partial correct output.
Part-E
a) Help Vanaram by filling out the missing bits in the table creation
process:
CREATE ____(i)____ Course(
C_ID CHAR(3),
F_ID ___(ii)____,
Cname VARCHAR (20),
Fees INT);
b) Vanaram: Hey Rama, would you please write the INSERT query for the
first row? I’ll follow and write the subsequent one myself.
c) Vanaram: I want to see the data of the table but the query: SELECT ALL
FROM TABLE Course; is not working. Can you fix it?
Ans.
a) (i) TABLE (ii) INT
b) INSERT INTO Course VALUES(‘C21’,102,’Grid Computing’,40000);
c) SELECT * FROM Course;
2+1+1=4 Marks
KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION
MARKING SCHEME (SET - 02)
CLASS: XI SESSION: 2022-23
INFORMATION PRACTICES (CODE 065)
TIME: 3 HRS M M: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 marks each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
Internal choice is given in two questions (19 and 23).
5. Section C has 05 Short Answer type questions carrying 03 marks each.
Internal choice is given in two questions (29 and 30).
6. Section D has 03 Long Answer type questions carrying 05 marks each.
Internal choice is given in two questions (31 and 33).
7. Section E has 02 questions carrying 04 marks each.
One internal choice is given in Q 34 and 35 against part c only.
8. All programming questions are to be answered using Python Language only.
Q. N. Part-A Marks
___________ deals with the interaction between humans and computers using human
spoken languages, such as Hindi, English, etc.
A. Data Science
4 B. Neuroscience 1
C. Natural Language Processing
D. All of the above
Ans. C. Natural Language Processing
Which one is the command to add a new column in an already existing relation in SQL?
A. Add
B. Alter
5 1
C. Insert
D. Change
Ans. B. Alter
A column is declared with char (10) size, and assigned 4 characters only. How many
total characters will this column occupy?
A. 4
11 B. 5 1
C. 10
D. 11
Ans. C. 10
Which of the following clauses is used in the SQL select statement to filter rows to be
included in the query result.
A. Order By
13 B. Group by 1
C. Having
D. Where
Ans. D. Where
In the relational model, the number of attributes and number of tuples of a relation
are termed as _________ and _________ respectively.
A. cardinality, domain
15 B. domain, degree 1
C. degree, cardinality
D. cardinality, degree
Ans. C. degree, cardinality
Part-B
Correct code:
print(‘area of circle calculator’)
19 2
r=7
pi=3.14
area=pi*r**2
OR
What will be the output of following program
x=10
for i in range(x):
if x==5:
break
print("H")
print(x)
Ans. 10
An organization named Gaurav wants to put all the data in the form of records. The
records are stored in a table and tables are stored in a database. Which DDL command
is used to create a database name Gaurav? Write down the SQL Statement to create
20 the database. 2
Ans.
i. CREATE
ii. CREATE DATABASE Gaurav;
Write down the full form of following i/o devices: OCR, MICR, OMR, VR
Ans.
OCR- optical character reader
21 2
MICR- magnetic ink character recognition
OMR- Optical Mark Reader
VR- Virtual reality
Consider the table Student {S_Id, S_Name, S_Age, S_Class, S_Fee}. Write the command
to display S_Id, S_Name and S_Class of the students who are studying in class 5, 9, 10
23 and 12. 2
Ans.
SELECT S_Id, S_Name, S_Class
FROM Student
WHERE S_Class IN (5, 9, 10, 12);
OR
What is the purpose of the INSERT command? Explain briefly with an example?
Ans.
INSERT is a DML command that is used to add a new record/tuple in a table
Syntax:
INSERT INTO <Tablename>[Attribtelist] VALUES(Value1,Value2,......, value n);
Example:
INSERT INTO PERSON(ID,NAME,Mobile)
VALUES(101,”Sandeep”, 9955882200);
Part-C
Differentiate between generic and special purpose software. Give an example in each
case.
Ans: General purpose application software is a kind of application that can be used
for a variety of tasks. It is not limited to one particular function. They provide large no
of features for its users.For example, a word processor could be classed as general
purpose software as it would allow a user to write a novel, create a restaurant menu
26
or even make a poster. 3
Special purpose application software is a type of software created to execute one
specific task. For example, a camera application on your phone will only allow you to
take and share pictures
Generic: Word Processing Application, Spreadsheet etc.
Specific: Adobe Photoshop, Corel Draw etc.
Write a program to check if the number is positive or negative or zero and display an
appropriate message. (input: num=3.4, 0 and -4.5)
Ans.
num = 3.4
# Try these two variations as well:
# num = 0
27 # num = -4.5 3
if num > 0:
print("Positive number")
elif num == 0:
print("Zero")
else:
print("Negative number")
Write a python program to check whether the given character is a vowel or not.
28 Ans. 3
my_ch = input("Enter a character: ")
if my_ch in ['a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U']:
print(my_ch, 'is a vowel')
else:
print(my_ch, 'is not a vowel')
A news channel broadcasts information on a wide range of topics. The news channel
permits people to submit breaking news, which is subject to verification by the
channel’s reporters. It may be difficult to distinguish between real news and fake
news, which can lead to confusion among readers and threaten a news organization’s
reputation. Which domain is used to detect fake news so that the audience has a high
level of trust in the news channel? Write in brief about this domain.
Ans. Natural Language Processing. It refers to the branch of computer science and
more specifically, the branch of artificial intelligence with giving computers the ability
to understand text and spoken words in much the same way human beings can.
OR
A company interested in cloud computing is looking for a provider who offers a set of
basic services such as virtual server provisioning and on-demand storage that can be
29 combined into a platform for deploying and running customized applications. What 3
type of cloud computing model fits these requirements?
a) Platform as a Service
b) Software as a Service
c) Infrastructure as a Service
Also, Explain your choice.
Ans.
c) Infrastructure as a Service because The IaaS providers can offer different kinds of
computing infrastructure, such as servers, virtual machines (VM), storage and backup
facility, network components, operating systems or any other hardware or software.
Using IaaS from the cloud, a user can use the hardware infrastructure located at a
remote location to configure, deploy and execute any software application on that
cloud infrastructure.
Mr. Khan wants to view the structure of an existing table - STUDENT in a database
SCHOOL.So he started Mysql, write down the sequence of the commands he should
use as he is not sure about the name of the table also.
Ans.
i) Use SCHOOL
ii) Show tables
iii) Describe STUDENT
OR
30 3
Mitali is confused with the terms Domain, Tuple and Attribute. Help her to understand
the terms with a suitable example of each.
Ans.
Domain: A domain is a set of allowable values for one or more attributes.
Tuple: A tuple is a row of a relation. Total no. of tuples (rows) is called the cardinality
of the relation.
Attribute: An attribute is a named column of the relation. Total no. of attributes
(columns) is called the degree of the relation.
Part-D
Write a python program to count the frequency of each character using a dictionary
of a string (string should be entered by the user).
31 5
Ans.
text = input("Enter the text: ")
my_dict = {}
for ch in text:
if ch in my_dict:
my_dict[ch] += 1
else:
my_dict[ch] = 1
print(my_dict)
OR
Explain the use of get() and pop() methods in respect of Python Dictionary with
examples.
Ans.
get() → to access an element from a dictionary by specifying a key.
my_dict {'name': 'Jack', 'age': 26}
print(my_dict.get('age'))
pop() → remove a particular item from dictionary and returns its value
squares {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
print(squares.pop(4))
print(squares)
Write a SQL statement to create a table customer in shop database with following
structure
+---------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------------+------+-----+---------+-------+
| ID | int(11) | NO | | | |
| NAME | varchar(20) | NO | | | |
| AGE | int(11) | NO | | | |
| ADDRESS | char(25) | YES | | NULL | |
+---------+---------------+------+-----+---------+-------+
Write SQL statements for following
32 a. Create a database shop 5
b. Before creation of table open the newly created database shop
c. Create a table customer with above structure
d. Which field can be created as Primary key
e. What will be the degree of table/relation customer
Ans.
a. create database shop;
b. use shop;
c. create table customer(ID int(11), NAME varchar(20), AGE int(11), ADDRESS
char(25) DEFAULT NULL);
d. ID
e. 4
Answer the question (a) to (e) based on the table, Book given below:
Book
BNo Title Author Date_Purchased Price
c. Empty set
d.
PNAME
Saniya Mircha
Sachin Reelkar
Part-E
Miss Anita Bhati is a mathematics teacher. She often needs to evaluate her students
and analyze her scores to plan her teaching pedagogies. She has decided to use
technology for the same. Help her to perform the following task (a) to (d) using lists
in Python programming language.
a. Create a list named ‘scores’ having following values: 10, 7, 9, 11, 12, 15, 19, 20, 18,
4
b. Add the following values in the list using a single command.
34 15, 20, 45 4
c. Print the name of the value at index number 3.
d. Display the minimum sore from the list.
Ans:
a. scores=[0,7,9,11,12,15,19,20,18, 4]
b. scores.extend([15, 20,45])
c. scores[3]
d. min(scores)
Mar
Q Part-A
ks
What is DBMS?
A. DBMS is a collection of queries
B. DBMS is a high-level language
3 1
C. DBMS is a programming language
D. DBMS stores, modifies and retrieves data
Ans. D. DBMS stores, modifies and retrieves data
Given a string: s=’String’, Which statement converts string ‘s’ into List ‘L’.
A. L=s
B. L=list(s)
6 1
C. L=s[::]
D. all of the mentioned
Ans. B. L=list(s)
How is Column wise insertion of data different from simply passing values to a
table?
A. Column wise data leads in populating data on an optional basis i.e. whether the
user wanted to insert data in a column or not.
B. We can’t pass value to a table without mentioning column names in an insert
8 1
statement.
C. Passing values to a table without column names is always safe.
D. None of the above.
Ans. A. Column wise data leads in populating data on optional basis i.e.
whether the user wanted to insert data in a column or not.
MySQl is-
A. Proprietary Software
B. Free and Open Source Software
11 1
C. Shareware
D. None
Ans. Free and Open Source Software
An attribute in a relation is a foreign key if the ________ key from one relation is used
as an attribute in that relation.
A. Candidate
15 B. Alternate 1
C. Super
D. Primary
Ans. D. Primary
A: The data in Big Data is not only voluminous, but also unstructured like posts,
instant messages, chats, photographs, tweets, blog articles, news items, comments,
audio/video chats, etc.
18 1
R: Such data can be analyzed using traditional data analysis tools like DBMS,
spreadsheets etc.
Ans. (iii) A is True but R is False
Part-B
Find out the error(s) in the following python code:
print(‘even odd checker’)
n=input(‘enter the number’)
if(n%2==0):
print(‘even’)
else:
print(‘odd’)
Ans.
errors in the code:
print(‘even odd checker’)
n=input(‘enter the number’)
if(n%2==0): # here n is a string, as the input function returns a string by default
print(‘even’)
else: # else without if, it should be in the same level as if (indentation)
print(‘odd’)
correct code:
19 2
print(‘even odd checker’)
n=int(input(‘enter the number’))
if(n%2==0):
print(‘even’)
else:
print(‘odd’)
OR
What will be the output of following program
a = True
b = False
c = False
if a or b and c:
print ("PYTHON PROGRAMMING")
else:
print ("python programming")
Ans.
PYTHON PROGRAMMING
Explain CREATE command also Write down the syntax to create a table.
Ans. To define relations (create tables) in the database and specify attributes for
each relation along with data types for each attribute. This is done using the CREATE
TABLE statement.
Syntax:
CREATE TABLE tablename
20 2
(
attributename1 datatype constraint,
attributename2 datatype constraint,
:
attributenameN datatype constraint
);
Ans.
[10,50,30,100]
[50,30]
Consider the table Student {S_Id, S_Name, S_Age, S_Class, S_Fee}. Write the command
to display S_Id, S_Name and S_Age of the students whose Age is in the range 10 to 16
(both inclusive).
Ans.
SELECT S_Id, S_Name, S_Age
FROM Student
WHERE S_Age BETWEEN 10 AND 16;
OR
23 A table EMP has attributes EmpID, First_Name, Last_Name, Salary. Write down 2
command to add following data in the EMP table
i) 1111, NAVNEET, SHARMA, 60000
ii) 2222, NARESH, 50000
Ans.
i) INSERT INTO EMP VALUES(1111, “NAVNEET”, “SHARMA”, 60000);
ii) INSERT INTO EMP(EmpID,First_Name,Salary)
VALUES(2222,”NARESH”,50000);
Part-C
Write a python program to display the sum of first n natural numbers (Note: Value
of n should be entered by the user).
Ans.
n = int(input("Enter the number of terms: "))
28 3
sum = 0
for i in range (1, n+1):
sum += i
print(sum)
OR
Advantage:
Nowadays, countless computational nodes ranging from hand-held mobile devices
to personal computers and workstations are connected to Local Area Network
(LAN) or Internet. Therefore, it is economically feasible to reuse or utilise their
resources like memory as well as processing power. The grid provides an
opportunity to solve computationally intense scientific and research problems
without actually procuring costly hardware.
Disadvantage:
To set up a grid, by connecting numerous nodes in terms of data as well as CPU, a
middleware is required to implement the distributed processor architecture. The
setup provides some challenges in the form of security, resource management, data
management, communication, fault detection, etc.
i) Write down the name of the SQL command by which one can modify the structure
of a table? A table PRODUCT has attributes PID, PNAME, PRICE, DESCRIPTION.
ii) Write a command to add a new attribute QUANTITY of Integer type in this table?
Ans
ALTER TABLE Command
ALTER TABLE PRODUCT ADD QUANTITY INT;
OR
What are the constraints? Explain any two constraints.
30 3
Ans.
Constraints are the rules enforced on the data columns of a table. These are used to
limit the type of data that can go into a table. This ensures the accuracy and
reliability of the data in the database.
NOT NULL: It prevents null values from being entered into one or more columns
within a table.
UNIQUE (also referred to as a unique key constraint): It forbids duplicate values in
one or more columns within a table.
NOTE: PRIMARY KEY the combination of both NOT NULL and UNIQUE constraints.
Part-D
Write a python program to create a dictionary called fruits with below data:
"Banana":60,
"Apple":80,
"Orange":55,
"Pineapple":80
Using loop, print out all the key along with its price and in the following format:
Fruit = Apple and Price = 2
Also print the total amount one would need to purchase all of your fruits.
Ans.
fruits = {"Banana":60, "Apple":80, "Orange":55, "Pineapple":80}
total_price = 0
for fruit in fruits:
31 5
print("Fruit =", fruit, "and Price =", fruits[fruit])
total_price += fruits[fruit]
print("Total price:", total_price)
OR
What is the purpose of pop(), popitem(), clear() methods used with dictionaries in
python?
Ans -
pop() → remove a particular item from dictionary and returns its value
squares {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
print(squares.pop(4))
print(squares)
popitem() → remove an arbitrary item, return (key,value)
squares {1: 1, 2: 4, 3: 9, 4: 16, 5: 25}
print(squares.popitem())
print(squares)
Write the queries (a) to (e) based on the table given below:
Investor:
ID Name Age Village Income
OR
Consider the table - CUSTOMER given below. Write the output for (i) to (iv) and
write sql query for question (v)
CID CNAME LIMIT DOA BALANCE
iv.
CNAME
Vipul Patel
Seema Pratap
v. 7
1 mark for correct output. ½ mark for partial correct output.
Part-E
Ms. Preeti Sexena is a Class Teacher of VIII. She often needs to maintain the health
records of her students and analyze her scores to plan her pedagogies. She has
decided to use technology for the same. Help her to perform the following task (a)
to (d) using lists in Python programming language.
34 a. Create a List named - height with the following values : 4 4
b. sort the elements of the list in ascending order
c. Find how many times the value 4.4 appeared in the list.
d. Display the maximum value from the list.
Ans:
a. height=[4.4, 5.1, 5.4, 4.4, 3.9, 5.10, 6.0]
b. height.sort()
c. height.count(4.4)
d. max(height)
1 mark for each correct answer. ½ mark, for recognition of proper command/
function.
Huma is a sports fan. She wants to make a career as a sports journalist. She was
given a job as a sports columnist for her college magazine. She decided to present a
featurette about the Arjuna Award and the award receivers in the year 2022. She
consulted her friend Semim for preparation of the database. Here’s the
conversation between them.
Huma: Hello Semim, would you please help me out with this project?
Semim: Sure. I would love to be a part of it. What would I get in return?
Huma: Garma Garam Jalebis made by Amma.
Semim: Wow, you sure know how to treat your bestie. Cheppa (tell me), what are
your queries?
Huma: Hmmm.. first of all we need to collect the data from https://pib.gov.in/, an
official website of the Ministry of Youth Affairs and Sports. We will then create a
database and various tables to perform the analysis.
Semim: Okay, let’s do it.
(They successfully obtained the data from the website and created the database and
35 tables.) 4
Huma: Thanks a ton but wait can you tell me how do I access this data when I am all
by myself?
Ans.
a) USE DATABASE Sports;
b) SHOW TABLES;
c) SELECT * FROM Arjuna_Puraskar_22;
d) INSERT INTO <table_name> VALUES(val1,val2,.....valN);
1+1+1+1=4 Marks
KENDRIYA VIDYALAYA SANGATHAN JAIPUR REGION
Marking Scheme SET-4
CLASS: XI SESSION: 2022-23
INFORMATION PRACTICES (CODE 065)
TIME: 3 HRS M M: 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 marks each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
Internal choice is given in two questions (19 and 23).
5. Section C has 05 Short Answer type questions carrying 03 marks each.
Internal choice is given in two questions (29 and 30).
6. Section D has 03 Long Answer type questions carrying 05 marks each.
Internal choice is given in two questions (31 and 33).
7. Section E has 02 questions carrying 04 marks each.
One internal choice is given in Q 34 and 35 against part c only.
8. All programming questions are to be answered using Python Language only.
Mar
Q Part-A
ks
Network of interconnected items with integrated sensors that can gather and
transmit data in real time is known as the _______.
4 A. Internet of Things 1
B. Big Data
C. Model
D. None of the above
Ans. A. Internet of Things
How can you insert a new row into the “STORE” table
A. INSERT ROW (1,‟ RAM SINGH‟) INTO STORE;
B. INSERT VALUES (1,‟ RAM SINGH‟) INTO STORE;
8 C. INSERT INTO (1,‟ RAM SINGH‟) STORE; 1
D. INSERT INTO STORE VALUES (1,‟ RAM SINGH‟);
Ans. D. INSERT INTO STORE VALUES (1,‟ RAM SINGH‟);
The ___________ acts as an interface between the device and the operating
system.
A. Device Conductor
10 B. Device Driver 1
C. Hardware Drive
D. Hardware Conductor
Ans. B Device Driver
Mr. Rajan wants to add a new attribute in an existing table in MySql, which
command he should use : -
A. DESCRIBE
16 B. ALTER TABLE 1
C. DELETE
D. INSERT ATTRIBUTE
Ans. B. ALTER TABLE
18 A: Web of Things (WoT) allows the user to browse the web using anything in the 1
physical world like a toaster, an oven or a fan.No need of a phone or a PC.
R: The ‘Internet of Things’ is a network of devices that have embedded hardware
and software to communicate (connect and exchange data) with other devices on
the same network.
Ans. (iv) A is false but R is True
Part-B
Ans.
errors in the code:
if(4>9):
print(‘4 is greater than 9’)
else if(9>4): # it should be elif instead of else if
print(‘4 is smaller than 9’)
else(4==9): # else doesn’t accept any argument
print(‘4 is equal to 9’)
correct code:
19 if(4>9): 2
print(‘4 is greater than 9’)
elif(9>4):
print(‘4 is smaller than 9’)
else:
print(‘4 is equal to 9’)
OR
Ans.
S1: DDL
S2: DML
OR 2
23
State True or False in reference with INSERT INTO command of SQL?
i) INSERT is not a part of DDL?
ii) While adding tuples using the INSERT command, one must specify values
for all the attributes of the table.
Ans
i) True
ii) False
Part-C
Ans:
a. Adobe PhotoShop : Application software
b. Windows 10 : System Software
c. Disk Defragmenter : System Software
d. Ms-Word: Application software
e. Google Chrome: Application software
f. Avast Antivirus: System Software
½ mark for each correct answer
The Air LMN Airlines Group want to train pilot. The trainees can take the headset
home and train for as long as they need. This includes them familiarizing the
aircraft and 360-degree walkarounds.What kind of emerging trend is useful here
Ans.VR. A traditional VR home simulator generally consists of the same flight
control setup
OR
CBSE has started to provide the digital copy of the marksheets online. Which
technology can be used to provide the decentralized data sharing architecture?
29 One in which safety and security of the transactions are ensured because all the 3
members in the network keep a copy of the file and so it is not possible for a single
member of the network to make changes or alter data. Can the same tech be applied
in other areas? (If yes, Write the names of two such areas)
Ans.
Blockchain: The blockchain technology works on the concept of decentralized and
shared database where each computer has a copy of the database.
Yes, The blockchain technology can be used in diverse sectors, such as banking,
media, telecom, travel and hospitality and other areas.
Ans
i)ALTER TABLE PRODUCT ADD PRIMARY KEY(PID)
ii) ALTER TABLE PRODUCT MODIFY PRICE FLOAT(7,2)
iii) ALTER TABLE PRODUCT DROP DESCRIPTION
OR
Explain the concept of Primary Key, Candidate Key and Alternate Key.
Ans.
Candidate Key – A candidate key is an attribute or set of attributes that can
uniquely identify a tuple.
Primary Key: It is one of the keys selected from candidate keys that uniquely
identify every row in that table.
Alternate Key – One key is chosen as the Primary Key from candidate keys,
and the remaining candidate keys, if exists, are called as the alternate keys.
Part-D
Ans -
a)keys() - returns all the available keys
x=dict(name=“Aman",age=37,country=“India")
print(x.keys())
OUTPUT
dict_keys(['country','age','name'])
4.
Write the queries (a) to (e) based on the table given below:
Table: Professor
P_ID PName Department Tinkha
1803 Heigenberg
OR
Consider the table - TRANSACTION given below. Write the output for (i) to (iv) and
write sql query for question (v)
TNO ACNO TTYPE DOT AMOUNT
12548 DD 2021-10-17
Deposit
Withdraw
DD
v.
Cardinality
1 mark for correct output. ½ mark for partial correct output.
Part-E
Ms. Anjana is a Super Store Manager. She often needs to maintain the records of
products in the store and analyze data to plan her sales targets. She has decided to
use technology for the same. Help her to perform the following task (a) to (d) using
lists in Python programming language.
a. Create a List named - ‘price’ with the following values 780, 390, 110,145,
34 4
224, 390, 165, 390, 444, 254, 77
b. remove the last added element in the list.
c. Delete the first occurance of 390 from the list.
d. Sort the elements of the list in descending order.
Ans:
a. price=[780, 390, 110,145, 224, 390, 165, 390, 444, 254, 77]
b. price.pop()
c. price.remove(390)
d. price.sort(reverse=True)
1 mark for each correct answer. ½ mark, for recognition of proper command/
function.
Hemachndra Rawat likes to play competitive video games and he also records his
gaming session on twitch. One day his cousin Shrea calls him to help her out with a
school project about esports. Here’s the snippet of their conversation.
Shrea: I would like to create a digital database about recent and popular game titles.
Can you help me out with that?
Hemachandra: Why not. Just let me know what the details are you looking for.
Shrea: I want to know the names of popular games, their production companies,
Genre, Download count, followers on social media etc.
Hemachandra: I think I can work with that. I’ll create a database and a few tables,
you can populate them with the data later on.
Shrea: Great. Can you tell me how to check the results?
Hemachandra: Of course. I’ll tell you how to create and manage your database.
We will use MySQL for this purpose.
They created the database and the tables and now Shrea is ready with some queries
4
35 to test the database. Answer her query on Hemchandra’s behalf:
Q Part-A Marks
which command we use cane use To remove string “hello” from list1, Given,
list1=[“hello”]
A. list1.remove(“hello”)
6 B. list1.pop(list1.index(“hello”)) 1
C. both a & b
D. none of these
Ans. C. both a & b
A relation is having 5 columns and 6 rows, find out the Degree and Cardinality
of this Relation-
A. 1 Degree and 1 Cardinality
9 B. 6 Degree and 5 Cardinality 1
C. 5 Degree and 6 Cardinality
D. 2 Degree and 2 Cardinality
Ans. 5 Degree and 6 Cardinality
A: Jump statements in python are used to alter the flow of a control statement like
you want to skip a part of a loop or a condition
17 1
R: break, continue and pause are three jump statements available in a python.
Ans: iii. A is True but R is False
Part-B
Ans.
errors in the code:
print(‘enter a number between 1 and 9’)
num=int(input())) # remove extra closing bracket )
if(num>9):
print(‘the number is greater than 9’)
elif(num<0):
print(‘the number is less than ‘0’) # start and end quote utilization issue
else:
print(‘good buoy/garl’)
correct code:
print(‘enter a number between 1 and 9’)
num=int(input())
if(num>9):
print(‘the number is greater than 9’)
elif(num<0):
print(‘the number is less than \‘0\’’)
else:
print(‘good buoy/garl’)
OR
What will be the output of following program
n=0
while n < 5:
n+=1
if n==3:
continue
print (n,end=’ ’)
print("Loop Over")
Ans. 1 2 4 5 Loop Over
Differentiate append() and extend() methods used with lists? Illustrate with
an example of both?
Ans. append() → it used to add a single element at the end of a list.
example
Lst=[10,20,30]
Lst.append(50)
print(Lst)
22 2
extend() → used to add multiple elements at the end of a list or add a list at the end
of an existing list
example
Lst=[10,20,30]
lst1=[40,50]
Lst.extend(lst1)
print(Lst)
Consider the table Employee {EId, EName, Age, Designation, Salary, Department}.
Write the command to display EId, EName, Age, Designation and Department of the
employees whose Age is greater than 18 or department is not HR.
Ans.
SELECT EId, EName, Age, Designation, Department
FROM Employee
WHERE Age > 18 AND Department <> "HR";
OR
23 Name the command to add new tuples into a table? State the information one 2
needs before adding a new tuple into a table?
Ans.
One must know the correct attribute name, their data types and constraints to add
new tuples.
Differentiate between the interactive mode and script mode available with python
IDLE.
Ans: Interactive mode is where you type commands and they are immediately
24 executed. Script mode is where you put a bunch of commands into a file (a script), 2
and then tell Python to run the file.
1 mark each for for correct explanation of Interactive mode and Script mode
Write python code to convert the time given in minutes into hours and
minutes.
Ans:
min=int(input(“Enter time in minutes &”))
27 3
h=min//60
m=min%60
print(“Hours=”, h)
print(“Minutes=”, m)
Write a python program to print the below shown pattern where no. of rows
should be entered by the user (Note: no. of rows should be less than equal to
20 else show error).
*
* *
* * *
* * * *
Ans.
28 3
n = int(input("Enter no. of rows (less than equal to 20): "))
if n < 0 or n > 20:
print("Error! invalid range")
exit(-1)
for i in range(n):
for j in range(i + 1):
print("*", end=' ')
print("")
Mr. Anil Mohan is a computer teacher ,he want to explain about use of machine
learning through some example.Suggest any 3 suitable example or application area
where machine learning can be used.
Ans. Traffic prediction, Product recommendation, Self driving cars, Stock market
29 3
trading etc.
OR
The new addition of the Apple watch has a feature called “Crash Detection”. Which
can send an SOS to the emergency contact and the emergency services. This can be
a life saving feature for many unfortunate people who otherwise lose their lives
due to the lack of immediate emergency support at the time of the need. The crash
detection algorithm needs data to process and identify the situation. How do you
think that data is provided to the algorithm? Can you list two such data/input
providers in a wearable?
Ans.
A smart sensor is a device that takes input from the physical environment and
uses built-in computing resources to perform predefined functions upon detection
of specific input and then process data before passing it on.
a) Gyroscope
b) Heart Rate Monitoring
c) SPO2
d) Accelerometer
Ans
i) USE
ii) DROP DATABASE
iii) DROP TABLE
OR
30 3
Explain the concept of DDL, DML and DQL commands.
Ans.
A database is an organized collection of structured information, or data,
typically stored electronically in a computer system.
DDL: Data Definition Language consists of the SQL commands that can be
used to define the database schema such as create, drop, alter and truncate
etc.
DML: Data Manipulation Language consists of the SQL commands that deal
with the manipulation of data present in the database such as insert, update,
delete etc.
DQL: Data Query Language consists of a single SQL command i.e. select which
is used for performing queries on the data within schema objects.
Part-D
Consider the below data, Write a python program to perform below tasks.
"Banana":60,
"Apple":80,
"Orange":55,
"Pineapple":80
31 5
(a) Print the list of values
(b) Remove 'Orange' from the dictionary
(c) Create the copy of the dictionary
(d) Update the price for Apple to 100
(e) Remove all the items from the dictionary
Ans.
fruits = {"Banana":60, "Apple":80, "Orange":55, "Pineapple":80}
# Ans (a)
print(list(fruits.values()))
# Ans (b)
fruits.pop("Orange")
print("After Pop:", fruits)
# Ans (c)
temp_dict = fruits.copy()
print("Copy:", temp_dict)
# Ans (d)
fruits["Apple"] = 100
print("After price update:", fruits)
# Ans (e)
fruits.clear()
print("Empty dictionary:", fruits)
OR
Ans -
a)items()- return the list with all dictionary keys with values.
x=dict(name="Aman",age=37,country="India")
print(x.items())
OUTPUT-
dict_items([('country','India'),('age',37),('name','Aman')])
b)update()- used to change the values of a key and add new keys
x=dict(name="Aman",age=37,country="India")
d1=dict(age=39)
x.update(d1,state="Rajasthan")
print(x)
OUTPUT-{'country':'India','age':39,'name':'Aman','state':'Rajasthan'}
Table SALE
PRODID QTY RATE AMOUNT
1 10 100 1000
2 5 50 250
32 5
a. Write sql commands create above table SALE with suitable datatype
b. Can we take the QTY column of SALE table as Primary Key? If no give reason
c. Which column is best suitable for applying Primary Key?
d. what is the cardinality of above table
e. what is the degree of above table
Write the queries (a) to (e) based on the table given below:
33 5
Course
C_ID F_ID Cname Fees
102
104
106
OR
Consider the table - RESTAURANT given below. Write the output for (i) to (iv) and
write sql query for question (v)
SNO NAME TYPE DOA COST
i.
SNO NAME TYPE DOA COST
NAME
Veg Manchurian
v.
insert into RESTAURANT values (111, ‘Tawa Roti’, Null, Null, 20);
(or any other equivalent form of input)
1 mark for correct output. ½ mark for partial correct output.
Part-E
Ms. Vijeta is a climatologist. She often needs to maintain the records of temperature
of the area under study and analyze data to forecast weather. She has decided to
use technology for the same. Help her to perform the following task (a) to (d) using
lists in Python programming language.
a. Create a list named ‘temp’, with the following values :
27,29,33,34,28,26,27,28,30,31,32,28
b. Reverse the order of the elements in he list
c. Display the first three elements of the list.
34 4
d. Add 32 as a new element at the last of list
Ans:
a. temp=[27,29,33,34,28,26,27,28,30,31,32,28]
b. temp.reverse()
c. temp[4]
d. temp.append(34)
1 mark for each correct answer. ½ mark, for recognition of proper command/
function.
A shop called Rainbow Garments that sells school uniforms, maintains a database
SCHOOL_UNIFORM. It consisted of two relations — UNIFORM and PRICE. They
made UniformCode as the primary key for UNIFORM relations. Specify SQL queries
to rectify the following anomalies.
35 4
a) There’s a new product, a Handkerchief. The colors are Red and White. The
Price is Rs. 100. The PID is ‘hkcf2004’ and ‘hkcf2005’ respectively. Insert the
above data in the Relation Product(PID, Name, Color, SIze, Price).
b) Write down the query to check the table contents.
c) Write down the query to display all the products with size “S” and color
“Blue”.
Ans.
a) INSERT INTO Product (PID, Name, Color, Price)
VALUES(‘hkcf2004’,’Handkerchief’, ‘Red’,100);
INSERT INTO Product (PID, Name, Color, Price)
VALUES(‘hkcf2005’,’Handkerchief’, White,100);
b) SELECT * FROM Product;
c) SELECT * FROM Product WHERE Size=’S’ AND color=’Blue’;
2+1=1 Marks