Computer Science · Class 12 Optional
Ch 7Understanding Data — Class 12 Computer Science, concept-first.
Every day, people make choices based on data or information. When you pick a college for admission, you look at placement records from previous years, the qualifications and experience of faculty, the quality of labs and hostels, and the fees charged.
97
Q&A
23
Concepts
40m
Section weightage
Computational Thinking and Programming – 2 · across all 7 lessons
Key concepts
Hover a concept to preview it and jump to its most relevant Q&A.
Arithmetic Mean
Imagine you and your friends are comparing pocket money. One friend gets ₹500, another gets ₹200, a third gets ₹800, and you get ₹300.
Most relevant Q&A
- Assume that height (in cm) of students in a class are as follows [90,102,110,115,85,90,100,110,110]. What is the mean or average height of t…Preview
- Consider the previous data of height of students used in calculation of mean value. In order to compute the median, the first step is to sor…Preview
- In the list of height of students [90,102,110,115,85,90,100,110,110], what is the mode?Preview
- In the above example, the minimum height value is 85 cm and the maximum height value is 115 cm. What is the range?Preview
- Let us compute the standard deviation of the height of nine students that we used while calculating Mean. The Mean (x̄) was calculated to be…Preview
In previous exams
How often this chapter’s concepts have been examined — real appearance data, never estimated.
Chapter contents
The NCERT structure, section by section. Open a section to see its questions, then read the concept-first solution.
Introduction to Data
Every day, people make choices based on data or information. When you pick a college for admission, you look at placement records from previous years, the qualifications and experience of faculty, the…
Importance of Data
Data is the foundation of almost every decision we make, whether personal or professional. Without data, choices are based on guesswork; with data, they become informed, measurable, and often reveal p…
Types of Data
2 QData comes from many sources, and its format depends entirely on where it originates. An image is a grid of pixels, a video is a sequence of frames, a fee slip mixes numbers and text, and a chat messa…
+−Activities1 question
Data Collection
Data collection is the first step in any data processing task. Before you can analyse or store data, you must first gather it.
+−Think & Reflect1 question
Data Storage
Once data has been gathered and processed to produce results, it is rarely thrown away. Instead, we store it for future reference and reuse.
+−Think & Reflect1 question
Data Processing
Data processing is the bridge between raw data and useful information. A collection of numbers, text, or images by itself does not give us answers.
Statistical Techniques for Data Processing
Given a set of data values, we need to process them to get information. There are various techniques which help us to have preliminary understanding about the data.
Measures of Central Tendency
4 QA measure of central tendency is a single value that gives us some idea about the data. Instead of looking at every individual data value, we can calculate one of these measures to understand the aver…
+−Worked Examples1 question
+−Worked Examples1 question
+−Worked Examples1 question
+−Think & Reflect1 question
Measures of Variability
3 QThe measures of variability tell you about the spread or variation of values around the mean. They are also called measures of dispersion, and they indicate the degree of diversity in a data set.
+−Worked Examples1 question
+−Worked Examples1 question
Summary
- Data refer to unorganised facts that can be processed to generate meaningful result or information.
Exercises
+−Show 9 questionsHide questions9 questions
- Q1Identify data required to be maintained to perform the following services: (a) Declare exam results and print e-certificates (b) Register pa…Free
- Q2A school having 500 students wants to identify beneficiaries of the merit-cum means scholarship, achieving more than 75% for two consecutive…Free
- Q3A bank 'xyz' wants to know about its popularity among the residents of a city 'ABC' on the basis of number of bank accounts each family has…Free
- Q4Identify type of data being collected/generated in the following scenarios: (a) Recording a video (b) Marking attendance by teacher (c) Writ…Preview
- Q5Consider the temperature (in Celsius) of 7 days of a week as 34, 34, 27, 28, 27, 34, 34. Identify the appropriate statistical technique to b…Preview
- Q6A school teacher wants to analyse results. Identify the appropriate statistical technique to be used along with its justification for the fo…Preview
- Q7Suppose annual day of your school is to be celebrated. The school has decided to felicitate those parents of the students studying in classe…Preview
- Q8For the annual day celebrations, the teacher is looking for an anchor in a class of 42 students. The teacher would make selection of an anch…Preview
- Q9Differentiate between structured and unstructured data giving one example. The principal of a school wants to do following analysis on the b…Preview
CBSE Sample Papers
Questions from official CBSE sample papers.
+−Show 77 questionsHide questions77 questions
- Q1State True or False: "A Python List must always contain all its elements of same data type."Preview
- Q2What will be the output of the following statement? ```python print(14%3**2*4) ``` (A) 16 (B) 64 (C) 20 (D) 256Preview
- Q3Identify the correct output of the following code snippet: game="Olympic2024" print(game.index("C")) (A) 0 (B) 6 (C) -1 (D) ValueErrorPreview
- Q4Which of the following is the correct identifier? (A) global (B) Break (C) def (D) withPreview
- Q5Identify the invalid Python statement out of the following options: (A) `print("A",10,end="*")` (B) `print("A",sep="*",10)` (C) `print("A",1…Preview
- Q6Which of the following operator evaluates to True if the variable on either side of the operator points towards the same memory location and…Preview
- Q7Consider the statements given below and then choose the correct output from the given options: ```python D={'S01':95, 'S02':96 } for I in D:…Preview
- Q8Which of the following built-in function/method returns a dictionary ? (A) dict() (B) keys() (C) values() (D) items()Preview
- Q9What does the return statement do in a function ? Explain with the help of an example.Preview
- Q10Consider the following dictionaries, D and D1 : D={"Suman": 40, "Raj":55, "Raman":60} D1={"Aditi":30, "Amit":90,"Raj":20} (Answer using buil…Preview
- Q11The code given below accepts N as an integer argument and returns the sum of all integers from 1 to N. Observe the following code carefully…Preview
- Q12State True or False : In Python, data type of 74 is same as the data type of 74.0.Preview
- Q13Identify the output of the following code snippet : s = "the Truth" print(s.capitalize()) (A) The truth (B) THE TRUTH (C) The Truth (D) the…Preview
- Q14Which of the following expressions in Python evaluates to True ? (A) 2>3 and 2<3 (B) 3>1 and 2 (C) 3>1 and 3>2 (D) 3>1 and 3<2Preview
- Q15What is the output of the following code snippet ? s='War and Peace by Leo Tolstoy' print(s.partition("by")) (A) ('War and Peace ', 'by', '…Preview
- Q16What will be the output of the following statement ? print("PythonProgram"[-1:2:-2])Preview
- Q17What will be the output of the following code snippet ? t = tuple('tuple') t2 = t[2], t += t2 print(t) (A) ('tuple') (B) ('tuple','p') (C) (…Preview
- Q18Which of the following statements is true about dictionaries in Python ? (A) A dictionary is an example of sequence datatype. (B) A dictiona…Preview
- Q19If L is a list with 6 elements, then which of the following statements will raise an exception ? (A) L.pop(1) (B) L.pop(6) (C) L.insert(1,6)…Preview
- Q20What will be the output of the following code ? def f1(a,b=1): print(a+b,end='-') c=f1(1,2) print(c,sep='*') (A) 3-2 (B) 3-2* (C) 3-None (D)…Preview
- Q21Q. Nos. 20 and 21 are Assertion (A) and Reason (R) based questions. Mark the correct choice as : (A) Both Assertion (A) and Reason (R) are t…Preview
- Q22What is the difference between default parameters and positional parameters in Python ? Also give an example of a function header which uses…Preview
- Q23Assuming that D1 is a dictionary in Python, (i) (a) Write a Python expression to check if the key, 'RNo' is present in D1. OR (b) Write a Py…Preview
- Q24What possible output(s) from the given options will NOT be displayed when the following code is executed ? Also, mention, for how many itera…Preview
- Q25The function given below is written to accept a string s as a parameter and return the number of vowels appearing in the string. The code ha…Preview
- Q26State True or False: While defining a function in Python, the positional parameters in the function header must always be written after the…Preview
- Q27What will be the output of the following statement: print(16*5/4*2/5-8) (A) -3.33 (B) 6.0 (C) 0.0 (D) -13.33Preview
- Q28What possible output from the given options is expected to be displayed when the following Python code is executed? import random Signal = […Preview
- Q29Identify the invalid Python statement from the following: (A) d = dict() (B) e = {} (C) f = [] (D) g = dict{}Preview
- Q30Identify the statement from the following which will raise an error: (A) print("A"*3) (B) print(5*3) (C) print("15" + 3) (D) print("15" + "1…Preview
- Q31Q. 17 and 18 are ASSERTION (A) and REASONING (R) based questions. Mark the correct choice as (A) Both (A) and (R) are true and (R) is the co…Preview
- Q32The code given below accepts five numbers and displays whether they are even or odd. Observe the following code carefully and rewrite it aft…Preview
- Q33(A) Write a user defined function in Python named showGrades(S) which takes the dictionary S as an argument. The dictionary, S contains Name…Preview
- Q34(A) Write the Python statement for each of the following tasks using built-in functions/methods only: (i) To remove the item whose key is "N…Preview
- Q35Predict the output of the following code: def callon(b=20,a=10): b=b+a a=b-a print(b,"#",a) return b x=100 y=200 x=callon(x,y) print(x,"@",y…Preview
- Q36Write the output on execution of the following Python code: S="Racecar Car Radar" L=S.split() for W in L: x=W.upper() if x==x[::-1]: for I i…Preview
- Q37State True or False. "Identifiers are names used to identify a variable, function in a program".Preview
- Q38Which of the following is a valid keyword in Python? (a) false (b) return (c) non_local (d) nonePreview
- Q39Given the following Tuple Tup=(10, 20, 30, 50) Which of the following statements will result in an error? (a) print(Tup[0]) (b) Tup.insert(2…Preview
- Q40Consider the given expression: 5<10 and 12>7 or not 7>4 Which of the following will be the correct output, if the given expression is evalua…Preview
- Q41Select the correct output of the code: S="Amrit Mahotsav @ 75" A=S.partition(" ") print(A) (a) ('Amrit Mahotsav', '@', '75') (b) ['Amrit', '…Preview
- Q42Which of the following operators will return either True or False? (a) += (b) != (c) = (d) *=Preview
- Q43Which of the following statement(s) would give an error after executing the following code? stud={"Murugan":100, "Mithu":95} # Statement 1 p…Preview
- Q44What will the following expression be evaluated to in Python? print(4+3*5/3-5%2) (a) 8.5 (b) 8.0 (c) 10.2 (d) 10.0Preview
- Q45Which function returns the sum of all elements of a list? (a) count() (b) sum() (c) total() (d) add()Preview
- Q46Q. 17 and 18 are Assertion (A) and Reasoning (R) based questions. Mark the correct choice as (a) Both (A) and (R) are true and (R) is the co…Preview
- Q47Atharva is a Python programmer working on a program to find and return the maximum value from the list. The code written below has syntactic…Preview
- Q48Write a functions EOReplace() in Python, which accepts a list L of numbers. Thereafter, it increments all even numbers by 1 and decrements a…Preview
- Q49State True or False. "Comments are not executed by interpreter."Preview
- Q50Which of the following is not a sequential datatype in Python ? (a) Dictionary (b) String (c) List (d) TuplePreview
- Q51Given the following dictionary Day={1:"Monday", 2: "Tuesday", 3: "Wednesday"} Which statement will return "Tuesday". (a) Day.pop() (b) Day.p…Preview
- Q52Consider the given expression : 7<4 or 6>3 and not 10==10 or 17>4 Which of the following will be the correct output if the given expression…Preview
- Q53Fill in the blank : ___________ is not a valid built-in function for list manipulations. (a) count() (b) length() (c) append() (d) extend()Preview
- Q54Which of the following is an example of identity operators of Python ? (a) is (b) on (c) in (d) not inPreview
- Q55What will the following expression be evaluated to in Python ? print(6/3 + 4**3//8-4) (a) 6.5 (b) 4.0 (c) 6.0 (d) 4Preview
- Q56Which of the following functions is a valid built-in function for both list and dictionary datatype ? (a) items() (b) len() (c) update() (d)…Preview
- Q57Ravi, a Python programmer, is working on a project in which he wants to write a function to count the number of even and odd values in the l…Preview
- Q58Which of the following is not a valid variable name in Python? Justify reason for it not being a valid name. (i) 5Radius (ii) Radius_ (iii)…Preview
- Q59Which of the following are keywords in Python? (i) break (ii) check (iii) range (iv) whilePreview
- Q60Name the Python Library modules which need to be imported to invoke the following functions: (i) cos() (ii) randint()Preview
- Q61Rewrite the following code in Python after removing all syntax error(s). Underline each correction done in the code. input('Enter a word',W)…Preview
- Q62What possible output(s) are expected to be displayed on screen at the time of execution of the program from the following code? Also specify…Preview
- Q63Write the names of the immutable data objects from the following: (i) List (ii) Tuple (iii) String (iv) DictionaryPreview
- Q64Write a Python statement to declare a Dictionary named ClassRoll with Keys as 1, 2, 3 and corresponding values as 'Reena', 'Rakesh', 'Zareen…Preview
- Q65Which of the options out of (i) to (iv) is the correct data type for the variable Vowels as defined in the following Python statement? Vowel…Preview
- Q66Write the output of the following Python code: for i in range(2,7,2): print(i * '$')Preview
- Q67Write the output of the following Python code: def Update(X=10): X += 15 print('X = ', X) X=20 Update() print('X = ', X)Preview
- Q68Write a Recursive function in Python RecsumNat(N), to return the sum of the first N natural numbers. For example, if N is 10 then the functi…Preview
- Q69Write the names of any four data types available in Python.Preview
- Q70Name the Python Library modules which need to be imported to invoke the following functions: (i) sqrt() (ii) start()Preview
- Q71Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code. 250 = Number WHILE Numb…Preview
- Q72Find and write the output of the following python code: Msg1="WeLcOME" Msg2="GUeSTs" Msg3="" for I in range(0,len(Msg2)+1): if Msg1[I]>="A"…Preview
- Q73Write four features of object oriented programming.Preview
- Q74class Box: #Line 1 L = 10 #Line 2 Type="HARD" #Line 3 def __init__(self,T,TL=30): #Line 4 self.Type = T #Line 5 self.L = TL #Line 6 def Disp…Preview
- Q75Define a class HOUSE in Python with the following specifications: Instance Attributes - Hno # House Number - Nor # Number of Rooms - Type #…Preview
- Q76Answer the questions (i) to (iii) based on the following: class Furniture(object): #Line 1 def __init__(self,Q): #Line 2 self.Qty = Q def Ge…Preview
- Q77Write a python method/function Swapper(Numbers) to swap the first half of the content of a list Numbers with second half of the content of l…Preview