Students must start practicing the questions from CBSE Sample Papers for Class 11 Computer Science with Solutions Set 8 are designed as per the revised syllabus.

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

Time Allowed: 3 hours
Maximum Marks: 70

General Instructions:

  • All questions are compulsory.
  • Attempt all parts of each question
  • Internal choices are given, choose any one of them.

Question 1.
(a) Which system is used to keep track of employees who receive wages / salaries?
(A) Attendance
(B) Payroll
(C) Salary
(D) None of these
Answer:
Option (B) is correct.

(b) While comparing tuples, int and float are considered as same. (True/False)
Answer:
True

(c) Which function is used to convert a sequence data type into a tuple?
(A) update()
(B) append()
(C) tuple()
(D) create()
Answer:
Option (C) is correct.

Explanation:
The Python tuple ( ) function is a built-in function in python that can be used to create a tuple.

(d) Which of these functions is used with dictionaries in Python?
(A) min()
(B) insert()
(C) max()
(D) keys()
Answer:
Option (D) is correct.

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

(e) Saloni is a software engineer, she wants to print her name and her qualification in same line using two different print statements of Python. Write the statements for her. [2]
Answer:
print(“Saloni”,)
print(“Software Engineer”)

(f) Write a short note on while loop? [2]
Answer:
while loop is used to repeat the set of instructions till the test condition is true. The condition for execution of loop is checked after every repetition and else statement is executed when the condition becomes false.

Syntax:
while <condition>:
set 1 of statements
else:
set 2 of statements

(g) What are digital footprints? How are they created? [2]
Answer:
The records and traces left behind by any individual’s online activities are nothing but digital foot prints. Whatever one does online like visiting sites, online shopping, Facebook checking on social media sites, etc. all create digital footprints.

(h) Tuples are immutable python sequences, i.e. you cannot change elements of a tuple in place. Tuples’ items are indexed. Tuples store a reference at each index. Tuples can be indexed sliced and its individual items can be indexed, len (T) returns count of tuple elements.

Tuple manipulations functions are: len (), max (), min () and tuple (). [5]
1. In Python, tuple is what type?
(A) Mutable
(B) Immutable
(C) Either (A) or (B)
(D) None of these
Answer:
Option (B) is correct.

Explanation:
Tuples are immutable by design which means they cannot be charged after creation. Tuple holds a sequence of heterogeneous elements. Tuples store a fixed set of elements and do not allow changes.

2. Which method is used to return count of tuple elements?
(A) len (T)
(B) Count (T)
(C) Total (T)
(D) Sum (T)
Answer:
Option (A) is correct.

Explanation:
len () is the built in function in tuple. It is used to count the number of elements that present in the tuple.

3. The tuple’s method (s) are:
(A) max ()
(B) min ()
(C) len ()
(D) All of these
Answer:
Option (D) is correct.

Explanation:
max (), min (), len () are all tuple’s methods. max () is used to return the element with maximum value out of the elements in tuple min () is used to return with maximum value of out of elements in tuple. len () is to count the number of elements that present in the tuple.

4. Which type of brackets is used to define the tuple?
(A) []
(B) ()
(C) { }
(D) <>
Answer:
Option (B) is correct.

Explanation:
A tuple is a collection of python objects separated by commas (,) Tuples are declared in parentheses (). They hold a sequence of heterogeneous elements.

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

5. The immutable Python sequence is:
(A) list
(B) tuple
(C) variable
(D) dictionary
Answer:
Option (B) is correct.

Explanation:
The immutable Python sequence is Tuple which cannot be changed creation.

Question 2.
(a) Dot matrix printer is belongs to which type of devices. [1]
Answer:
Output device

(b) Which of the following are not valid strings in Python? [1]
(a) “Hello”
(b) ‘Hello’
(c) “Hello’
(d) {Hello}
Answer:
(C) and (D)

(c) (i) Which value can be stored by number data type? [1 mark each [2]]
(ii) Why are data types important?
Answer:
(i) Number data types store numeric values i.e integer, decimal numbers and complex numbers
(ii) Data types allow us to manipulate values.

(d) Predict the output of the following python code written by a student of class xii of APS.
num1=dict([(‘a’,”hello”),(‘b’,” welcome”)])
print(‘numl = ‘,numl)
num2=dict([(‘a’,”hello”),(‘b’,”welcome”), (‘c’, “good bye”)])
print(‘num2 =’ ,num2)
Answer:
num1 = {‘a’:”hello”, ‘b’:”welcome” }
num2 = {‘a’:”hello”, ‘b’:”welcome”, ‘c’: “good bye”}

(e) (i) Write the advantages of Python.
(ii) How Python is easy to use?
(iii) Is Python Language Free and Open Source Language?
(iv) Write two disadvantages/Minuses of Python.
Answer:
(i) 1. Easy to use OOP’s concept
2. Expressive Language
3. Interpreted Language

(ii) Python is compact and very easy to use object oriented, very simple syntax rules and user friendly, so it is very easy comparison to other language

(iii) Yes, It is a free and open source language.

(iv) Not the fastest language

Question 3.
(a) Mrs Jain wants to teach her students Fallacy, define it in your own words.
Answer:
An expression that always yields a false or 0 is called fallacy.

(b) What do you mean by operating system ?
Answer:
Operating System is a software program which manages the hardware and software resources and links them. It creates an interface between hardware and user. It is a bridge between the hardware and the software.

(c) (i) What privacy settings should be done before you start using social media?
(ii) Write two special features of Instagram.
Answer:
(i) Before using social media, do the following privacy settings:

  • Set who all can see your posts
  • Set who can send request to you
  • Set what part of your information is visible to others.

(ii) 1. Sharing real time photos.
2. Sharing short videos while on the go.

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

Question 4.
(a) In Python, unusual situations are termed as exceptions.(True/False)
Answer:
True

(b) Underline the runtime error in the following program.
x = int(input(“Enter the value of x:”))
y = 0
z = x/y
Answer:
x = int(input(“Enter the value of x:”))
y = 0
z = x/y # Division by zero.
Here, x/y will generate the run time error.

(c) (i) What does negative index in a list indicate?
(ii) Which method of Python Lists must be used in these cases?
(1) Get the position of an item in the list.
(2) Add single item at the end of the list.
(3) Add elements in a list at the end of another list.
OR
What are the steps for problem solving?
Answer:
(i) Negative index is used to indicate position from the end of the list

(ii) The methods to be used are:
1. index( )
2. append( )
3. extend( )

OR

Problem-solving involves the following steps:

  • Problem Analysis involves identifying the problem and the input data and the output desired.
  • Developing an algorithm is the step where all the possible solutions to the problem are identified and the best out of these is represented as an algorithm in a natural language.
  • Coding is done using any of the programming languages based on the algorithm developed.
  • Testing and debugging is required to check if the developed system produces the required output and any errors found are removed.

Question 5.
(a) Draw a flowchart to find sum of digits of a number.
Answer:
CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions 1
Commonly Made Error
The student must initialized digit=n%10 , n=n/10.

Answering Tip
The sum of the number is calculated using the formula

(b) Write a short note on File Management.
OR
Explain utility software and also define its types.
Answer:
A file is a collection of related information defined by its creator. Computer can store files on the disk (secondary storage), which provide long term storage. Some examples of storage media are magnetic tape, magnetic disk and optical disc. Each of these media has its own properties like speed, capacity, data transfer rate and access methods. A file system is normally organized into directories to ease their use. These directories may contain files. [4]
The five major activities of an operating system in regard to file management are :

  • The creation and deletion of files.
  • The creation and deletion of directories.
  • The support of primitives for manipulating files and directories.
  • The mapping of files onto secondary storage.
  • The backup of files on stable storage media

OR

It is a system software designed to help in management and tuning of operating systems, computer hardware and different application software. A single piece of utility software is usually called a utility or a tool. Utilities are those application programs that assist the computer by performing house-keeping functions like backing up disk or scanning/cleaning viruses. A utility program carries out some of the common tasks, while using a computer system. Utility software is also known as service program, service tool or utility routine. It differs from applications mostly in terms of size, complexity and function. Utility programs are bundled with operating systems. However, these programs are also available in a separate package and that s why they are sometimes considered separate from system software.

Utilities include Disk Compression, Backup, Virus Protection Utilities (Antivirus), Disk Defragmentation Utilities etc.
Types of Utility Software:

  • Disk Compression: It is a utility software which perform the task of emphasis on the drive, so that more space is available for additional data to be stored.
  • Backup: It can make copy of all information stored on a disk and restore either the entire disk files (e.g. an event of disk failure) or selected files (e.g. an event of accidental deletion) on the user defined storage.
  • Disk Defragmenter: It can detect computer files, whose contents are broken across several locations on the hard disk and move these fragments in a particular location to increase storage efficiency.
  • Disk Checker and Disk Cleaner: Disk Checker is a fully-featured disk diagnostics and repairing tool with backup ability.
  • Disk Partition Tool: It is a utility tool which can divide an individual drive into multiple logical drives,
    each with its own file system which can be mounted by the operating system and treated as an individual drive.

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

Question 6.
(a) Look at the following two code snippets where each code counts number of lettersand ‘s’ in a sentence:
CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions 2
What is the difference between the two codes given above.
OR
In the Code given below to calculate the sum of squares of first 10 natural numbers, find the output. Why the output is so? If the output is not correct then mark the error and write correct code. AE
n=10
answer=0
while(n>0):
answer=answer+n**2
print(answer)
Answer:
Code 1: Two if statements are used when each case is to be tested separately irrespective of the output of the former whether it is true or false, the later will always execute. Code 1 takes more processing time. Code 2: if-elif statement is used in case2 when the first condition becomes true then the program will not check later conditions. Code 2 is more efficient.
OR
The while loop in the code is an infinite loop. So the while loop will not terminate. The wrong statement is
n=n + 1/ or the test expression i.e. while n>0. Correct code will be.

n=10
answer=0
while (n>0):
answer = answer+n**2
n = n-1
print (answer) or
n=1
answer = 1
while (n<=10):
answer = answer+n**2
n = n+1 print(answer)

(b) (i) Which type of error will be produced in this case: while True print]”this is even”) [1]
(ii) Which type of error will be produced in this case: 12 + ’11’ ‘ [1]
Answer:
(i) Syntax error
(ii) TypeError

(c) List the situations in which the following errors occur: [4]
(1) IOError
(2) NameError
(3) ValueError
(4) TypeError
Answer:
1. IOError:
It occurs due to incorrect input/output like opening a file which does not exist, deleting a file which is in use etc.

2. NameError:
It occurs when a variable is used that does not exist.

3. ValueError:
It is raised when an operation is performed on an incorrect type of value.

4. TypeError:
It is raised when an invalid operation for a specified data type is attempted

CBSE Sample Papers for Class 11 Computer Science Set 8 with Solutions

Question 7.
(a) A/An tracks the users computing habits and data to produce targeted ad-popups. [1]
Answer:
adware

(b) (i) What precautions should be taken while handling emails ? [2]
(ii) What is cyber safety? Why is it important ? [2]
Answer:
(i) While handling email:

  • Make sure to open only the mails from known senders.
  • Do not open any attachments with the mails from unknown senders.
  • Never click on any link to a legitimate looking website. It may take you to a fraudulent site.
  • To visit any website mentioned in an email, type the address of the website in your browser.

(ii) Cyber safety refers to provide safety in cyber space. It means that a user should follow safety rules to protect ourselves from falling in the hands of cyber criminals. Cyber safety is important because detecting cybercrimes and reaching the criminals is very difficult due to the anonymity of internet of allowing the criminals to be hidden.

Question 8.
Mrs. Jain Runs a school for specially abled kids. She wants to teach them computer. What challenges she might face in this regard. [5]
OR
What are the effects of cyber bullying and trolling ?
Answer:
Various disability issues faced in the teaching/ learning computers with regard to the disability are:
Unavailability of teaching material/aids:
Students with different disabilities need different types of teaching aids/ material. For instance visually challenged students would want readers that could read the digital content to them, hearing impaired students would want more of visual input than oratory, low vision students may need Braille keyboards, braille monitors and printers along with screen readers for working on computers. Unavailability of such supportive programming aids and software are a big issue that must be handled by the school and the management.

Lack of special needs teachers:
For different types of special needs, students require special needs teachers. For example: a hearing impaired student needs a teacher who is able to converse in sign language and would be able to convey and explain study material. There should be teachers who know what type of hardware and software tool can be used for the differently able students as per their specific needs. For example braille keyboards, monitors and printers, synthetic speech generators etc, software assistants like Google assistant, Microsoft Narrator and Cortana, specialized editors for visually impaired students for typing programs, etc.

Lack of supporting curriculum:
Curriculum should be designed while keeping focus on inclusive education. Sofwares and programs should be so used so that disabled students can easily work on that. For example office software based curriculum can be easily implemented as it provides accessibility features and all types of students an easily work on it.

OR

Cyber bullying and trolling harass victim mentally and physically. Many changes in behaviour of victim of cyber bullying and trolling can be seen.

Some are as follows:

  • Due to cyber bullying and trolling, victims lose their self esteem. They start getting negative thoughts about themselves.
  • Victim stops talking to their friends and family or talk rarely. They always seem worried about something. They feel that they can’t come out from what is happening on web.
  • Cyber bullying affects a person deeply. It changes a person’s way of thinking even an optimist person becomes pessimist due to cyber bullying or trolling.
  • Cyber bullying and trolling cause serious effect on victims. Sometimes victims are unable to handle it and they even commit suicide.
  • There can be seen huge effects of cyber bullying on teenagers. Even the study says maximum victim of cyber bullying are of teenage group. Teenagers who are bullied are likely to experience depression, unhappiness and poor sleep & worry.
  • In most of the cases victims don’t share this with anyone and this makes their condition worse because they can not get the guidance which should be given to them in such situation.
  • On the web, bullies are faceless so they are more brutal. Cyber bullying can affect you psychologically more than ordinary bullying which happenes physically.

Question 9.
(a) (i) Define a string. [1]
(ii) What is range slice function in string? [1]
Answer:
(i) A string is a sequence of characters enclosed in single quote or double quotes.
(ii) The range slice function extracts substring from a string for which range is defined using a colon.

(b) Write the output of these codes: [4]
(i) m = 15
n = 1
while m > n:
m = m – 2
n += 2
print (m, end = ” “)

(ii) m = 12
n = 1
while m > n:
m = m – 2
n += 1
print (n, end = ” “)
Answer:
(i) 13, 11, 9, 7
(ii) 2, 3, 4, 5

Question 10.
Prove the following Boolean identity by using the laws of Boolean algebra: [1]
(a) A + AB = A
Answer:
L.H.S. = A + AB
= A (1 + B)
= A.1 (1 + B = 1)
= A R.H.S.