IP Sample Paper Class 12 2021 with Solutions
1. Term 1 IP Sample Paper Class 12 2021 with Solutions – Paper 1
2. Term 1 IP Sample Paper Class 12 2021 with Solutions – Paper 2
3. Term 1 IP Sample Paper Class 12 2021 with Solutions – Paper 3
IP Sample Paper Class 12 2021 with Solutions
IP Sample Paper Class 12 2021 with Solutions Syllabus of IP - TERM 1 Unit 1: Data Handling using Pandas and Data Visualization Data Handling using Pandas -I ● Introduction to Python libraries- Pandas, Matplotlib. ● Data structures in Pandas - Series and data frames.Series: Creation of series from dictionary, scalar value; mathematical operations; series attributes, head and tail functions; selection, indexing and slicing. ● Data Frames: creation of data frames from dictionary of series, list of dictionaries, text/CSV files, display, iteration. Operations on rows and columns: add ( insert /append) , select, delete (drop column and row), rename, Head and Tail functions, indexing using labels, Boolean indexing. Data Visualization ● Data Visualization : Purpose of plotting, drawing and saving of plots using Matplotlib (line plot, bar graph, histogram). Customizing plots:; adding label, title, and legend in plots. Unit 4: Societal Impacts ● Digital footprint, net and communication etiquettes, ● Data protection, intellectual property rights (IPR), plagiarism, licensing and copyright, ● Free and open source software (FOSS), ● Cybercrime and cyber laws, hacking, phishing, cyber bullying, overview of Indian IT Act. ● E-waste: hazards and management. Awareness about health concerns related to the usage IP Sample Paper Class 12 2021 with Solutions
IP Sample Paper Class 12 2021 with Solutions
Time: 90 min MM : 35
General Instructions:
- The paper is divided into 3 Sections- A, B and C.
- Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
- Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
- Section C, consists of Question number 50 to 55 and student need to attempt 5 questions
Section – A
Section A consists of 25 questions, attempt any 20 questions
Q1. NumPy, Pandas and Matplotlib are three Python __________ for scientific and analytical use.
- Libraries
- Models
- Programs
- Modules
Q2. Numpy stands for ________________
- Number Python
- Numerical Python
- Numerical Python Programs
- None of the above
Q3. Which of the following data structure help to analyse data in python?
- Series
- DataFrame
- Both of the above
- None of the above
Q4. Which of the following command is used to uninstall pandas?
- pip install pandas
- pip uninstall pandas
- uninstall pandas
- uninstall pip pandas
Q5. The ___________library in Python is used for plotting graphs and visualization.
- Matplotlib
- Series
- DataFrame
- Pandas
IP Sample Paper Class 12 2021 with Solutions
Q6. The following code is creating series from ______________________
>>> import pandas as pd >>> series1 = pd.Series([1,2,3])
- Scalar Values
- NumPy Arrays
- Dictionary
- None of the above
Q7. Which of the following are examples of visualization that we come across in our daily life?
- Traffic symbols
- Ultrasound reports
- Speedometer of a vehicle
- All of the above
Q8. Which module of matplotlib library is to be imported for plotting chart/graph?
- pyplot
- pieplot
- penplot
- PyPlot
Q9. ___________ function is used to create dataframe?
- Dataframe( )
- DataFrames( )
- DataFrame( )
- DF( )
Q10. Which of the following is not the component of chart/plot?
- Chart Label
- xticks
- Legend
- Yticks
IP Sample Paper Class 12 2021 with Solutions
Q11. ______________ is a trail of data reflecting user’s activities, actions, communications or transactions in digital media.
- Digital Finger Print
- Digital Footprint
- Digital Hand print
- Digital data
Q12. Which of the following are the characteristics of responsible netizen?
- Should not use copyrighted materials.
- Avoid cyber bullying.
- Respect Privacy of others
- All of the above
Q13. IPR stands for ___________________
- Intellectual Personal Rights
- Intellectual Property Response
- Intellectual Property Right
- Intelligent Property Right
Q14.How many rows will be there in the dataframe “DF” created below :
>>> “DF” = pd.DataFrame([seriesA, seriesB])
- 1
- 2
- 3
- 4
Q15. A patent protects an invention for ______ years, after which it can be freely used.
- 20
- 10
- 30
- 15
IP Sample Paper Class 12 2021 with Solutions
Q16. Which of the following is not a violation of IPR?
- Plagiarism
- Copyright Infringement
- Patent
- Trademark Infringement
Q17. Which of the following statement adding a new column “Marks” to Dataframe “DF”?
- DF[“Marks”] = [23, 24, 32]
- DF_Marks = [23, 24, 32]
- DF.Marks = [23, 24, 32]
- DF.loc[“Marks”] = [23, 24, 32]
Q18. Ravi copied some content from Internet and presenting as his own work. This act of Ravi is considered as ______________
- Copyright Infringement
- Patent
- Plagiarism
- All of the above
Q19. Which of the following function is used to add new row in Dataframe?
- loc( )
- row( )
- Loc( )
- Row( )
Q20. Which of the following are categories of public licenses.
- GPL
- CC
- Both of the above
- None of the above
IP Sample Paper Class 12 2021 with Solutions
Q21. __________ is a free and open source browser.
- Ubuntu
- Mozilla Firefox
- Microsoft Edge
- Google Chrome
Q22. Which of the following is not the cyber-crime?
- Hacking
- Phishing
- Cyber bullying
- Patent
Q23. We cannot perform the ___________ operation on dataframe.
- Adding a new column
- Adding a new row
- Deleting a row
- None of the above
Q24. _______________ function is used to delete a column from a Dataframe.
- del( )
- delete( )
- drop( )
- crop( )
Q25. ____________ function returns the total values present in the dataframe?
- shape( )
- size( )
- values( )
- no_of_values( )
IP Sample Paper Class 12 2021 with Solutions
Section – B
Section B consists of 24 Questions (26 to 49). Attempt any 20 questions
Q26. Write the output of the following code:
import pandas as pd s2 = pd.Series(["K","S","Ri"], index=[3,5,1])print(s2[0])
- K
- S
- Error
- Ri
Q27. Which of the following statement will return error? Assuming that import statement is already there.
- S1 = pd.series([1, 2, 3])
- s1 = pd.Series({1,2,3})
- Both of the above
- None of the above
Q28. Ravi wants to add two series ‘S1’ and ‘S2’. His friend Raman suggested him four statements. Help him to find the correct one.
- S1 + S2
- S1.add(S2)
- Both of the above
- S1.sum(S2)
Q29. To ensure good health of a computer system, we should :
- Regularly clean it to keep the dust off.
- Wipe monitor’s screen often using the regular microfiber soft cloth.
- not eat food or drink over the keyboard.
- All of the above
Q30. Amit is trying to plot a graph. He writes the following code but still the graph is not visible. Please help him to find the missing statement.
import matplotlib.pyplot as plt date=["25/12","26/12","27/12"] temp=[8.5,10.5,6.8] plt.plot(date, temp)
- plt.Show( )
- plt.display( )
- plt.show( )
- plt.disp( )
IP Sample Paper Class 12 2021 with Solutions
Q31. Read the statements given below and identify the right option.
Statement A : A marker is any symbol that represents a data value in a line chart or a scatter plot.
Statement B : We can either use character codes or the color names as values to the parameter color in the plot().
- Statement A is correct
- Statement B is correct
- Statement A is correct, but Statement B is incorrect
- Statement A is correct and Statement B is also correct
Q32. ___________ are column-charts, where each column represents a range of values, and the height of a column corresponds to how many values are in that range.
- Bar
- Hist
- Histogram
- Column
Q33. Any one causing any form of pollution will pay for the damage caused. This is called __________________
- Pollutant pays Principle
- Polluter pays Principle
- Pollute pays Principle
- Pollution pays Principle
Q34. ___________ is an unlawful activity where fake websites or emails that look original or authentic are presented to the user.
- Phishing
- Email Spoofing
- Identity theft
- Hacking
Q35. Consider the following series “s1” and write the output of print(s1[1: 5 : 2]):
0 1 1 2 2 3 3 5 4 7 5 9 dtype: int64
a) 1 1 3 3 dtype: int64 b) 0 2 3 5 dtype: int64 c) 1 2 3 5 dtype: int64 d) 1 2 5 5 dtype: int64
IP Sample Paper Class 12 2021 with Solutions
Q36. Ravi is working in a company. His job is to exploit a website in order to discover its security loopholes or vulnerabilities. He then reports his findings to the website owner. Who is Ravi?
- Ethical hacker
- Unethical hacker
- Explorer
- Data Analyst
Q37. Ananya wants to delete a row (labeled as ‘science’) from a dataframe “DF”. Which of the following command is suitable for her to accomplish the task?
- DF.drop(‘science’, axis=0)
- DF.del(‘science’, axis=0)
- DF.drop(‘science’, axis=1)
- DF.del(‘science’, axis=1)
Q38. Which of the following is not an e-waste?
- Discarded Computer
- Damaged Mobile Phones
- Broken Speakers
- None of the above
Q39. Which of the following statement is correct to rename the row indices Maths to sub1, Science to sub2, Hindi to sub3 of a dataframe “DF”?
- DF.rename({‘Maths’ : ‘Sub1′, ‘Science’ : ‘Sub2′,’English’ : ‘Sub3′, }, axis=’Index’)
- DF.rename({‘Maths’:’Sub1′, ‘Science’:’Sub2′,’English’:’Sub3′, }, axis=’row’)
- DF.rename({‘Maths’:’Sub1′, ‘Science’:’Sub2′,’English’:’Sub3′, }, axis=’columns’)
- DF.rename({‘Maths’:’Sub1′, ‘Science’:’Sub2′,’English’:’Sub3′, }, axis=’index’)
Q40. NaN in the following series stands for ___________________
a 11.0
b NaN
c 53.0
dtype: float64
- None and None
- Not a None
- Not a Number
- Number a Not
IP Sample Paper Class 12 2021 with Solutions
Q41. Which of the following is not associated with violation of IPR?
- Plagiarism
- Copyright Infringement
- Trademark Infringement
- Patent
Q42. Data frame in python cannot be created from:
- NumPy ndarrays
- List of Dictionaries
- Series
- Tuple of Dictionary
Q43. Write the code to display values greater than 3, from the series “s1”
- print(s1[s1>3])
- print([s1>3])
- print(s1.[s1>3])
- print(s1_s1>3)
Q44. Sunil is learning and practicing the coding of Dataframe in Python. By mistake he executes the following command.
DF[ : ] = 0 #”DF” is a dataframe
What will happen to the dataframe “DF” after executing the above code?
- Set all values in DF to 0
- Set all values of first row to 0.
- Set all values of first column to 0
- None of the above
Q45. The name and logo of the software will be protected by:
- Copyright
- Patent
- Trademark
- Plagiarism
IP Sample Paper Class 12 2021 with Solutions
Q46. Consider the following dataframe “DF”.
2014 2015 2016 2017
Mina 100.5 12000 20000 50000
Kiran 150.8 18000 50000 60000
Anil 200.9 22000 70000 70000
Amit 30000 30000 100000 80000
Which of the following command returns(4, 4)?
- DF.size
- DF.shape
- DF.values
- DF.columns
Q47. Which of the following command is loading the data from “task.csv” to the dataframe “DF”?
- DF = DF.read_csv(“C:/NCERT/task. csv”)
- DF = pd.Read_csv(“C:/NCERT/task. csv”)
- DF = pd.read_csv(“C:/NCERT/task. csv”)
- DF = pd.reading_csv (“C:/NCERT/task. csv”)
Q48. Which of the following is not the attribute of dataframe?
- index
- columns
- Transpose
- values
Q49. Read the statements given below. Identify the right option from the following for Attribute and method/function.
Statement A: Attribute always ends without parenthesis.
Statement B: Function/Method cannot work without arguments.
- Both statements are correct.
- Both statements are incorrect.
- Statement A is correct, but Statement B is incorrect
- Statement A is incorrect, but Statement B is correct
IP Sample Paper Class 12 2021 with Solutions
Section – C
Section C, consists of 6 Question (50 to 55). Attempt any 5 questions.
IP Sample Paper Class 12 2021 with Solutions
Case Study
Mr. Singh is working in Data Centre. His friend Mr. Kashyap has given him a data in the form of Python Dataframe named “DF” containing year wise sales figures for four sales persons. Use the years as column labels, and sales person names as row labels.
2014 2015 2016 2017
Mina 100.5 12000 20000 50000
Kiran 150.8 18000 50000 60000
Anil 200.9 22000 70000 70000
Amit 30000 30000 100000 80000
Based on the information given above, answer the questions NO. 50-55.
Q50. He wants to display sales of Kiran. Select the correct option.
- print(DF.[‘Kiran’])
- print(DF.loc[‘Kiran’])
- print(DF.Loc[‘Kiran’])
- print(DF_loc[‘Kiran’])
Q51. He wants to display the values of year 2016. Suggest him the suitable option.
- print(DF_[2016])
- print(DF.loc[2016])
- print(DF[2016])
- print(DF_(2016))
Q52. He is confused about the command given below, please select the correct explanation.
print(DF[2014]+200)
- It will return error.
- It will increase value of 2014 by 200 in Dataframe and also display the increased values
- It will only display increased values of 2014 by 200.
- None of the above
Q53. Output of the following command is:
print(DF.loc[[True,False,True,False]])
1) 2014 2015 2016 2017 Mina 100.5 12000 20000 50000 Anil 200.9 22000 70000 70000 2) 2014 2015 2016 2017 Kiran 150.8 18000 50000 60000 Anil 200.9 22000 70000 70000 3) 2014 2015 2016 2017 Mina 100.5 12000 20000 50000 Amit 30000 30000 100000 80000 4) None of the above
Q54. Which of the following command will help Mr. Singh to set all the values of dataframe as ‘0’?
- DF[ : : ] = 0
- DF[ : ] == 0
- DF[ : ] = 0
- None of the above
Q55. What is the output of following command?
print(DF.size )
- 16
- 8
- 4
- 10
IP Sample Paper Class 12 2021 with Solutions
Time: 90 min MM : 35
General Instructions:
- The paper is divided into 3 Sections- A, B and C.
- Section A, consists of Question 1 to 25 and student need to attempt 20 questions.
- Section B, consists of Question number 26 to 49 and student need to attempt 20 questions.
- Section C, consists of Question number 50 to 55 and student need to attempt 5 questions.
IP Sample Paper Class 12 2021 with Solutions
Section – A
Section A consists of 25 questions, attempt any 20 questions
IP Sample Paper Class 12 2021 with Solutions
Q1. In Pandas ___________ is a two-dimensional data structure.
- Series
- DataFrame
- Matplotlib
- Panel
Q2. Ananya is writing a pandas program. She forgot to import library. Help her to choose the correct import statement.
- import pandas as PD
- import Pandas as pd
- import pandas as p@d
- import pandas as p d
Q3. Value of Series can be accessed by __________
- data
- pandas library
- index
- object
Q4. Write the datatype of the Series ‘S’ created below:
import pandas as pd
S = pd.Series(“Paper”)
- float64
- Str
- object
- int64
Q5. Write the output of the following :
import pandas as pd
S = pd.Series(“A”, “B”, “C”)
print S[1]
- A
- B
- C
- None of the above
IP Sample Paper Class 12 2021 with Solutions
Q6. How many values will be there in the series “S” given below:
import pandas as pd
S = pd.Series(5, index=range(1,7))
- 5
- 7
- 6
- 8
Q7. Which module of matplotlib library is to be imported for creating any chart or graph?
- plot
- pyplot
- py.plot
- py_plot
Q8. _____________ chart display information as a series of data points.
- Line
- Pi
- Bar
- Histogram
Q9. Ashok was writing features of DataFrame. Help him to identify the wrong feature.
- DataFrame is a two-dimensional data structure.
- Values in DataFrame cannot be changed.
- Rows and columns can be added in DataFrame.
- Rows and columns can be deleted from DataFrame.
Q10. Which of the following is correct statement for giving label of Y –axis? #plt is an alias name
- plt.ylabel(“Currency”)
- plt.yLabel(“Currency”)
- plt.ylabel(Currency)
- Plt.ylabel(“Currency”)
IP Sample Paper Class 12 2021 with Solutions
Q11. Anil and Sunil are friends. They separately manufacture their sports shoes. What we call that symbol which distinguishes their shoes from each other?
- Patent
- Copyright
- Trademark
- Label
Q12. Which of the following is a Net Etiquettes?
- Always copy content from internet.
- Always use copyright content as it will be authentic
- Post comment online using bad language.
- Take permission from content owner before using their content
Q13. Ananya purchased licensed software. She creates the multiple copies without the permission of the copyright owner. She is doing an act of ______________
- Trademark Infringement
- Patent Infringement
- Copyright Infringement
- Identity Theft
Q14. Complete the following code?
import pandas as pd
S = pd.Series([1,2,3,4], index=range(1, 8, _________ ))
print(S)
- 1
- 2
- 3
- 4
Q15. FOSS Stands for ___________________
- Free and Open Secure Software
- Free and Open Source Software
- Frame and Open Source Software
- Fresh and Open Source Software
IP Sample Paper Class 12 2021 with Solutions
Q16. Electronic components which are not working or damaged are known as ____________
- Computer dump
- Electronic dump
- Computer waste
- E – Waste
Q17. Suman was creating a dataframe from list of dictionaries. While doing her practice, she jotted down few observation. Help her to identify the correct observation.
- Dictionary keys are taken as column labels, and the values corresponding to each key are taken as rows.
- There will be as many rows as the number of dictionaries present in the list.
- Both of the above.
- None of the above
Q18. Identify the cyber-crime from the following.
- Printing the copies of own document.
- Stealing sensitive information (bank detail) and doing some transaction of money.
- Publishing post on website.
- Stealing jewellery.
Q19. Arjun can add a new row to a DataFrame using the _______________method.
- DataFrame.loc[ ]
- Dataframe.loc( )
- Data( )
- DataFrame[ ]
Q20. Rishika found a crumpled paper under her desk. She picked it up and opened it. It contained some text which was struck off thrice. But she could still figure out easily that the struck off text was the email ID and password of Garvit, her classmate. What is ethically correct for Rishika to do?
- Inform Garvit so that he may change his password.
- Give the password of Garvit’s email ID to all other classmates.
- Use Garvit’s password to access his account.
- None of the above
IP Sample Paper Class 12 2021 with Solutions
Q21. A user of digital technology needs to follow:
- net-etiquettes
- communication-etiquettes
- social media-etiquettes
- All of the above
Q22. What is the purpose of the following statement?
>>> DF = DF.drop(‘Science’, axis=0)
- This code will delete the row with label ‘Science’
- This code will delete the column with label ‘Science’
- This code will add the row with label ‘Science’
- This code will add the column with label ‘Science’
Q23. By using append ( ) function we can ____________________
- Merge two DataFrame.
- Merge Series to a DataFrame
- Merge Dictionary to a DataFrame.
- All of the above.
Q24. What is the default value of ‘sep’ parameter of read_csv ( ) function?
- Colon( : )
- Semicolon (;)
- Space
- Comma ( , )
Q25. Shape attribute of DataFrame return the result in the form of ______________
- List
- Tuple
- Dictionary
- String
IP Sample Paper Class 12 2021 with Solutions
Section – B
Section B consists of 24 Questions (26 to 49). Attempt any 20 questions.
IP Sample Paper Class 12 2021 with Solutions
Q26. Write the output of the following:
import pandas as pd
S1 = pd.Series(1, index = range(1,7,2))
print(S1[0 : 2])
a)
1 1
3 1
dtype: int64
b)
1 1
3 1
5 1
dtype: int64
c)
1 1
dtype: int64
d)Error
Q27. Consider the following series “S1” and select the statement which returns (3,)
A 1
B 5
C 9
dtype: int64
- S1.size
- S1.shape( )
- S1.shape
- S1.values
Q28. How many records of dataframe ‘DF’ will be displayed by the following statement?
print(DF.loc[[False, False, True, False, False, False]])
- 1
- 2
- 5
- 6
Q29. ___________ is the unauthorized use or distribution of software.
- Software privacy
- Software piracy
- Private Software
- Soft Piracy
Q30. Which of the following is not the attributes of plot( ) function?
- marker
- markersize
- LineWidth
- All of the above
IP Sample Paper Class 12 2021 with Solutions
Q31. Suman was trying to plot the histogram. Below is one of the incomplete statement from her code. Help her to complete that statement.
df.plot(kind = ’ __________ ’)
- histogram
- histo
- hist
- Hist
Q32. By looking at the following code of plotting a line plot, identify how many lines will be drawn?
df.plot(kind=’line’, color=[‘red’, ‘blue’, ‘brown’], marker = “*”, markersize = 10)
- 1
- 2
- 3
- 4
Q33. Sam is working in an IT company. His job profile is to find the loopholes in the website or online software of the company. In other words, Sam is helping in improving the security of the software. Who is Sam?
- Non-ethical Hacker
- Ethical Hacker
- Black hat hacker
- Grey hat hacker
Q34. Read the statement given below and identify the right options
Assertion: Eye strain is a symptom commonly complained by users of digital devices.
Reason: When we continuously look at the screen for watching, typing, chatting or playing games, our eyes are continuously exposed to the glare coming from the screens.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A
- A is true but R is false
- A is false but R is true.
Q35. Write the output of the following:
import pandas as pd
S1 = pd.Series((1, 5, 9, 11, 2), index = (“A”, “B”, “C”, “D”, “E”))
print(S1[“C” : “E” ])
a)
C 9
D 11
dtype: int64
b)
C 9
D 11
E 2
dtype: int64
c)
B 5
D 11
E 2
dtype: int64
d)
C 9
D 11
E 2
dtype: int64
IP Sample Paper Class 12 2021 with Solutions
Q36. ________________is a branch of science that deals with designing or arranging workplaces including the furniture, equipment and systems so that it becomes safe and comfortable for the user
- Ergonomics
- Economics
- Ergono
- Aesthetics
Q37. Consider the following dataframe ‘DF’. Ananya wants to display the records of “Tuesday”. Help her to find the correct code.
Days Class
0 Mon 5
1 Tue 3
2 Wed 6
- print(DF.loc[2])
- print(DF.loc[1])
- print(DF.loc[0])
- print(DF.loc[3])
Q38. Ananya, Rohit, Suman and Simran of class XII are debating on Device Safety. Their statements are given below:
Ananya: Use a liquid solution specifically formulated for the cleaning of electronic screens.
Rohit: Food crumbs that fall into the gaps between the keys or spilled over liquid do not cause any issues/damage to the devices.
Suman: Do not wipe monitor’s screen often using the regular microfiber soft cloth.
Simran: Good maintenance of electronics devices also increases the life of the devices
Identify those who are giving correct statements:
- Both Ananya and Rohit are correct
- Both Suman and Simran are correct
- Both Ananya and Simran are correct
- Suman and Simran are correct
Q39. Aman was trying to display the last 3 rows from the DataFrame “DF”. Help him to write the complete statement.
- DF.tail( )
- DF.tail(1,2,3)
- DF.tail(3)
- All of the above
Q40. Write the output of the following code:
import pandas as pd
S1 = pd.Series((1,5,9), index = (“A”,”B”,”C”))
print(S1[2]>9)
- True
- False
- 1
- 0
IP Sample Paper Class 12 2021 with Solutions
Q41. Aman spends most of its time on internet. Choose the right communication etiquettes which he should show to others:
- Be Polite
- Be Precise
- Be credible
- All of the above
Q42. Write the output of the following:
import pandas as pd
L={“A”:”Apple”, “B”:”Ball”,”C”:”Cat”}
S = pd.Series(L)
print(S)
a)
A Apple
B Ball
C Cat
dtype: object
b)
A Apple
B Ball
C Cat
dtype: int64
c)
A B C
Apple Ball Cat
dtype: object
d)
A B C
Apple Ball Cat
dtype: int64
IP Sample Paper Class 12 2021 with Solutions
Q43. Complete the following code:
import pandas as pd
L={“A”:65, “B”:45,”C”:23}
DS = pd.__________(L)
print(DS)
- series
- Dataframe
- DataFrame
- Series
Q44. Which of the following command will delete the column labeled as “Math” from the dataframe “DF”?
- DF = DF.drop(“Math”, axis = 0)
- DF = DF.drop(“Math”, axis = 1)
- DF = DF.Drop(“Math”, axis = 1)
- DF = DF.drop(“Math”, Axis = 1)
Q45. Expand CC in reference to public license.
- Create Commons
- Common Creative
- Creative Commons
- Create Creativity
Q46. Write the output of the following code:
import pandas as pd
Nm=[“Ashu”,”Riya”,”Gautam”,”Myra”]
Sc = [23, 24, 25, 12]
M=[30,28,23,26]
S = pd.DataFrame({“Name”:Nm, “Science”:Sc,”Math”:M})
print(S.shape)
- (4, 3)
- (3, 4)
- 4, 3
- [4, 3]
Q47. Consider the following DataFrame “S”
Name Science Math
0 Ashu 23 30
1 Riya 24 28
2 Gautam 25 23
3 Myra 12 26
Which of the following statement will display marks of “Myra” of “Science” and “Math” subject?
- print(S.loc[3:3, [“Science”, “Math”]])
- print(S.loc[2:3, [“Science”, “Math”]])
- print(S.loc[1:3, [“Science”, “Math”]])
- print(S.loc[0:3, [“Science”, “Math”]])
IP Sample Paper Class 12 2021 with Solutions
Q48. Consider the following series “S1”
0 30
1 28
2 23
3 26
dtype: int64
Which of the following statement will delete the value “23” from the Series?
- S1.drop[2]
- S1.drop(1)
- S1.drop(2)
- S1.drop(‘2’)
IP Sample Paper Class 12 2021 with Solutions
Section – C
Section C consists of 6 Questions (50 to 55). Attempt any 5 questions
IP Sample Paper Class 12 2021 with Solutions
Case Study
Mr. Raman is working in IT Company. He has the following data in the form of DataFrame named ‘S’ containing detail of books.
B_id Sub Price
T1 1 Math 100
T2 2 Science 130
T3 3 SST 90
T4 4 Eng 120
T5 5 Hindi 150
Based on the given information, answer the question no. 50 – 55
Q50. Select the code to display detail of “Eng” book.
- print(S.loc[2])
- print(S.loc[4])
- print(S.Loc[2])
- print(S.loc[3])
Q51. Mr. Raman wants to display the price column from the dataframe. Help him to write the correct code.
- print(S[price])
- print(S[“Price”])
- print(S[[“Price”]])
- Both b) and c)
Q52. Select the correct code to display the first four records.\
- print(S.loc[“T1” : “T4”])
- print(S.head(4))
- Both of the above.
- None of the above
Q53. Write a statement to add a new row “T6” with values [6, “Sanskrit”, 125]
- S.loc[“T6”]=[6, “Sanskrit”, 125]
- S.loc[“T6”]=(6, “Sanskrit”, 125)
- S.loc[“T6”]=6, “Sanskrit”, 125
- All of the above
Q54. Write a statement to delete the record of “T3”.
- print(S.drop(“T3”))
- print(S.drop(“T3” : “T3”))
- print(S.Drop(“T3”))
- print(S.Drop(“T3” : “T3”))
Q55. How many “True” values will be displayed in following code?
print(S.loc[:, “Price”]>90)
- 1
- 2
- 3
- 4
IP Sample Paper Class 12 2021 with Solutions
Disclaimer : I tried to give you the correct solution of “ IP Sample Paper Class 12 2021 with Solutions” , but if you feel that there is/are mistakes in “IP Sample Paper Class 12 2021 with Solutions” given above, you can directly contact me at csiplearninghub@gmail.com. NCERT Book and Study material available on CBSE official website are used as a reference to create above “IP Sample Paper Class 12 2021 with Solutions”
IP Sample Paper Class 12 2021 with Solutions
Important Links
100 Practice Questions on Python Fundamentals
120+ MySQL Practice Questions
90+ Practice Questions on List
50+ Output based Practice Questions
100 Practice Questions on String
70 Practice Questions on Loops
120 Practice Questions of Computer Network in Python
70 Practice Questions on if-else
40 Practice Questions on Data Structure
Computer Science Syllabus 2021-2022.
Informatics Practices Syllabus 2021-2022
Class 12 Computer Science Chapter wise MCQ
total 20 + 20 + 5 questions…..45..
How come Maximum Marks to 35
Each question carry 0.77 marks.