Oswaal NTA CUET (UG) Chapterwise Question Bank Informatics Practices (For 2024 Exam) 9789359581453, 9359581453

Description of the product: • Strictly as per the Latest Exam Pattern issued by NTA • 100% Updated with 2023 Exam Paper

149 29 15MB

English Pages 89 Year 2023

Report DMCA / Copyright

DOWNLOAD PDF FILE

Table of contents :
Cover
Contents
Know your CUET(UG) Exam
Latest CUET (UG) Syllabus
Examination Paper CUET 2023
DATABASE QUERY USING SQL
DATA HANDLING USING PANDAS-I
DATA HANDLING
USING PANDAS II
PLOTTING DATA USING MATPLOTLIB
INTRODUCTION TO COMPUTER NETWORKS
SOCIETAL IMPACTS
DATA COMMUNICATION
SECURITY ASPECTS
Recommend Papers

Oswaal NTA CUET (UG) Chapterwise Question Bank Informatics Practices (For 2024 Exam)
 9789359581453, 9359581453

  • 0 0 0
  • Like this paper and download? You can publish your own PDF file online for free in a few minutes! Sign Up
File loading please wait...
Citation preview

For 2024 Exam

Highly Recommended

CHAPTER-WISE

QUESTION BANK Includes SOLVED PAPERS (2022 - 2023)

INFORMATICS PRACTICES Strictly as per the Latest Exam Pattern issued by NTA

The ONLY book you need to #AceCUET(UG)

1

2

3

4

5

100% Updated

Previous Years’ Questions

Revision Notes

Concept Videos

800+ Questions

With 2023 CUET Exam Paper

(2022-2023) for Better Exam Insights

for Crisp Revision with Smart Mind Maps

for Complex Concepts Clarity

for Extensive Practice

(1)

1st EDITION

I S BN

YEAR 2024 "9789359581453"

CUET (UG)

SYLLABUS COVERED

PUBLISHED BY OSWAAL BOOKS & LEARNING PVT. LTD.

COP Y RIGHT

RESERVED

1/11, Sahitya Kunj, M.G. Road, Agra - 282002, (UP) India

BY THE PUBLISHERS

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, without written permission from the publishers. The author and publisher will gladly receive information enabling them to rectify any error or omission in subsequent editions.

1010, Cambourne Business Centre Cambridge, Cambridgeshire CB 236DP, United kingdom

0562-2857671

[email protected]

www.OswaalBooks.com

DI SCL A IM ER

This book is published by Oswaal Books and Learning Pvt Ltd (“Publisher”) and is intended solely for educational use, to enable students to practice for examinations/tests and reference. The contents of this book primarily comprise a collection of questions that have been sourced from previous examination papers. Any practice questions and/or notes included by the Publisher are formulated by placing reliance on previous question papers and are in keeping with the format/pattern/ guidelines applicable to such papers. The Publisher expressly disclaims any liability for the use of, or references to, any terms or terminology in the book, which may not be considered appropriate or may be considered offensive, in light of societal changes. Further, the contents of this book, including references to any persons, corporations, brands, political parties, incidents, historical events and/or terminology within the book, if any, are not intended to be offensive, and/or to hurt, insult or defame any person (whether living or dead), entity, gender, caste, religion, race, etc. and any interpretation to this effect is unintended and purely incidental. While we try to keep our publications as updated and accurate as possible, human error may creep in. We expressly disclaim liability for errors and/or omissions in the content, if any, and further disclaim any liability for any loss or damages in connection with the use of the book and reference to its contents”.

Kindle Edition (2)

Preface Welcome to the ultimate resource for your Common University Entrance Test (CUET) preparation! The Common University Entrance Test (CUET) marks a significant shift in the admission process for UG programs in Central Universities across India. The introduction of CUET aims to create a level playing field for students nationwide, regardless of their geographical location, and revolutionize the way students connect with these prestigious institutions. CUET (UG), administered by the esteemed National Testing Agency (NTA), is a prestigious all-India test that serves as a single-window opportunity for admissions. The NTA consistently provides timely notifications regarding the exam schedule and any subsequent updates. The curriculum for CUET is based on the National Council of Educational Research and Training (NCERT) syllabus for class 12 only. CUET (UG) scores are mandatory required while admitting students to undergraduate courses in 44 central universities. A merit list will be prepared by participating Universities/organizations. Universities may conduct their individual counselling on the basis of the scorecard of CUET (UG) provided by NTA. Oswaal CUET (UG) Question Bank is your strategic companion designed to elevate your performance and simplify your CUET journey for success in this computer-based test.

Here’s how this book benefits you: • 100% Updated with 2023 CUET Exam Paper • Previous years Questions (2022-2023)for Better Exam insights • Revision Notes for Crisp Revision with Smart Mind Maps • Concept Videos for complex concepts clarity • 800+ questions for Extensive Practice Almost 1.92 million candidates registered for CUET (UG) in 2023. Candidates have been quite anxious about appearing for CUET (UG), however, with the right preparation strategy and resources, you can secure a good rank in CUET (UG). We believe that with dedication, hard work, and the right resources, you can conquer CUET and secure your place in the Central Universities of your choice. Good luck with your preparations, with this trusted companion on your journey to academic success! All the best! Team Oswaal Books

(3)

Order Form

JEE (MAIN) 15 Mock Test Papers (For 2024 Exam)

National Talent Search Exam (NTSE) Year-wise Solved Papers (2011 -2021)

JEE (MAIN) 15 Mock Test Papers (Mathematics, Physics, Chemistry)

NTSE 10 Yearwise Solved Papers 2011-2021

JEE (MAIN) Year-wise 22 Solved Papers(All Shifts) (For 2023 Exam)

NRA Question Bank 10th Pass Quantitative Aptitude, Logical Reasoning, General Awareness, General English

Mathematics, Physics, Chemistry JEE (MAIN) Chapter-wise & Topic-wise Solved papers (2019-2023) Question Bank (For 2024 Exam)

NRA Question Bank 12th Pass Quantitative Aptitude, Logical Reasoning, General Awareness, General English

Mathematics, Physics, Chemistry JEE (MAIN) 24 Online Previous Years’ Solved Papers (All Shifts) 2023 (For 2024 Exam)

NRA Question Bank Graduation Pass Quantitative Aptitude, Logical Reasoning, General Awareness, General English

Mathematics, Physics, Chemistry JEE(Main) RMT Cards

Objective General English

Physics Part - I, Physics Part - II, Chemistry Part - I Chemistry Part - II, Mathematics Part -I, Mathematics Part - II

Objective General English Objective Quantitative Aptitude

JEE Advanced (For 2024 Exam) 22 Year-wise Solved Papers (2002-2023)

Objective Quantitative Aptitude CAT

Mathematics, Physics, Chemistry

CAT 15 Mock Test Papers, CAT 25 Years’ Chapterwise & Topicwise Solved Papers (1990-2008) & (2017-2022), CAT 10 Years’ Chapterwise & Topicwise Solved Papers (2005-2008) & (20172022), CAT 5 Years’ Solved Papers Shift-wise (2018-2022)

JEE Advanced 10 Mock Test Papers Paper 1 & Paper 2 (For 2024 Exam) JEE Advanced 10 Mock Test Papers (Paper-1 & 2) GATE 14 Year-wise (For 2024 Exam) Solved Papers (2010 to 2023)

CLAT & AILET 10 Solved Papers (For 2024 Exam) CLAT & AILET 10 Year-wise Solved Papers CLAT (2020-2023) & AILET (2018-2023)

GATE 14 Yearwise Solved Paper (General Aptitude), GATE 14 Yearwise Solved Paper (Engineering Mathematics)

UGC-NET

GATE 14 Years’ (For 2024 Exam) Chapterwise & Topicwise Solved Papers (2010 to 2023)

UGC NET Paper-1 Year-Wise-13 Solved Papers (2015-2023) (For 2024 Exam) General Aptitude, UGC NET Paper-1-15 Years’ Question Bank Chapterwise & Topicwise Solved Papers (20092023) General Aptitude & UGC NET Paper-1 - 15 Mock Test Papers (For 2024 Exam) General Aptitude

GATE 14 Years’ Chapterwise & Topicwise Solved Papers (General Aptitude), GATE 14 Years’ Chapterwise & Topicwise Solved Papers (Engineering Mathematics) NEET (UG) 36 Years’ Solved Papers (For 2024 Exam) Chapterwise & Topicwise 1988-2023

RRB NTPC 2023 1st Stage Exam RRB NTPC 12 Previous Years’ Papers 2016 (All Shifts) & 2019 (Two Shifts) +10 Mock Test Papers

Biology, Physics, Chemistry NEET (UG) 18 Year-wise Solved Papers (2006 to 2023)

UPSC CSE Prelims 10 Years’ Solved Papers (2014 -2023) English Medium (For 2024 Exam)

Biology, Physics, Chemistry

UPSC CSE Prelims General Studies (Paper-1), UPSC CSE Prelims General Studies (Paper-2) (CSAT)

NEET (UG) 15 Mock Test Papers (For 2024 Exam) Physics, Chemistry, Biology

UPSC CSE NCERT One for All (For 2024 Exam)

NEET (UG) RMT Cards

Polity, Economy, History, Geography, General Science

Physics Part-1, Physics Part-2, Chemistry Part-1, Chemistry Part2, Biology Part-1, Biology Part-2

UPSC Power Bank For UPSC CSE & State PSCs Exam (For 2024 Exam)

Handbook Class 11 & 12, Entrance Exams (Engineering & Medical)

Ancient & Medieval History, Art & Culture, Geography, Indian Polity, Indian Economy, Science & Tech., Environment & Ecology, Modern History

Physics, Chemistry, Mathematics & Biology Vedic Maths

UPSC CSE Prelims Mock Test Papers (For 2024 Exam)

Vedic Maths (Ashima Sekhri)

15 Mock Test Papers General Studies Paper-1, 15 Mock Test Papers (CSAT) General Studies Paper-2

CUET (UG) Mock Test Papers (For 2024 Exam)

UPSC CSE (Pre) 29 Years’ Solved Papers (1995-2023) (For 2024 Exam)

English, Accountancy, Biology, Business Studies, Chemistry, Mathematics/Applied Mathematics, Entrepreneurship, Computer Science/Informatics Practices, Sociology, Economics, Geography, History, Physics, Political Science, Psychology, Physical Education, General Test

UPSC 29 Years’ Topicwise Solved Question Paper Prelims GS Paper -1 & 2 UPPSC Prelims 15 Year-Wise Solved Papers

CDS Chapter-Wise & Topic-Wise Solved Papers (2014-2023)

UPPSC Prelims 15 Year-Wise Solved Papers GS Paper-1 & Paper-2

Elementary Mathematics, English, General Knowledge NDA-NA Chapter-Wise & Topic-Wise Solved Papers (2014-2023)

CDS Year wise 11 Solved Papers (2018-2023) Elementary Mathematics, English, General Knowledge

Mathematics, General Ability Test: English, General Ability Test: General Studies

NDA-NA Year-wise 12 Solved Papers (2017-2023) Mathematics, General Ability Test: English, General Ability Test: General Studies

CUET (UG) General Test Question Bank (For 2024 Exam) Quantitative Aptitude, Logical Reasoning, General Awareness

Exam Preparation Books for Class 1 to 12 : CBSE, CISCE Boards & Karnataka Board | OLYMPIADS | JEE | NEET | CUET | NDA | CDS | CAT | GATE | UPSC | UGC NET | NRA CET & more

We are available in all leading e-commerce platforms and all good bookstores.

(4)

Contents l Know your CUET(UG) Exam

6 -

6

l Latest CUET (UG) Syllabus

7 -

9

l Examination Paper CUET 2023

12 - 16

1-9



10 - 19 20 - 27 28 - 35 36 - 44 45 - 55 56 - 63 64 - 71 qqq

(5)

2 Languages + 6 Domain Specific Subject + General Test

OR

3 Languages + 5 Domain Specific Subjects + General Test

Subject/Language Choice

Objective Type with MCQs

CBT

Mode of Test

Test Pattern

Know Your CUET (UG) Exam SECTIONS

SECTION I (A) 13 Languages

Tested through reading Comprehension (i) Factual (ii) Literary (iii) Narrative

SECTION III SECTION I (B)

SECTION II

20 Languages

Domain Specific Subjects ( 27 Subjects)

General Test (Compulsory)

INCLUDES : NCERT Model syllabus (only of 12th Standard) is available on all the Subjects

(6)

• • • • • •

General Knowledge Current Affairs General Mental Ability Numerical Ability Quantitative Reasoning Logical & Analytical Reasoning

Latest CUET (UG) Syllabus INFORMATICS PRACTICES - 308 Note: There will be one Question Paper which will contain Two Sections i.e. Section A and Section B [B1 and B2]. Section A will have 15 questions covering both i.e. Computer Science/Information Practices which will be compulsory for all candidates Section B1 will have 35 questions from Computer Science out of which 25 questions need to be attempted. Section B2 will have 35 questions purely from Information Practices out of which 25 question will be attempted.

Section A : Informatics Practices Exception and File Handling in Python Exception Handling: syntax errors, exceptions, need of exception handling, user-defined exceptions, raising exceptions, handling exceptions, catching exceptions, Try - except - else clause, Try - finally clause, recovering and continuing with finally, built-in exception classes. File Handling: text file and binary file, file types, open and close files, reading and writing text files, reading and writing binary files using pickle module, file access modes.

Database Concepts Introduction to database concepts, difference between database and file system, relational data model: concept of domain, tuple, relation, keys - candidate key, primary key, alternate key, foreign key; Relational algebra: selection, projection, union, set difference and cartesian product;

Structured Query Language 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, DROP TABLE, ALTER TABLE, Data Query: SELECT, FROM, WHERE Data Manipulation: INSERT, UPDATE, DELETE Math functions: POWER (), ROUND (), MOD (). Text functions: UCASE ()/UPPER (), LCASE ()/LOWER (), MID ()/SUBSTRING ()/SUBSTR (), LENGTH (), LEFT (), RIGHT (), INSTR (), LTRIM (), RTRIM (), TRIM (). Date Functions: NOW (), DATE (), MONTH (), MONTHNAME (), YEAR (), DAY (), DAYNAME (). Aggregate Functions: MAX (), MIN (), AVG (), SUM (), COUNT (); using COUNT (*). Querying and manipulating data using Group by, Having, Order by. Operations on Relations - Union, Intersection, Minus, Cartesian Product, JOIN

Computer Networks Introduction to computer networks, Evolution of networking, Network types: LAN, WAN, MAN Network devices: Modem, Ethernet Card, Repeater, Hub, Switch, Router, Gateway. Network Topologies: Mesh, Ring, Bus, Star, and Tree topologies Basic concept of MAC and IP Address Difference between Internet and web

Section B2: Informatics Practices

(7)

Contd... Chapter 1: Database Query using SQL Math functions: POWER (), ROUND (), MOD (). Text functions: UCASE ()/UPPER (), LCASE ()/LOWER (), MID ()/SUBSTRING ()/SUBSTR (), LENGTH (), LEFT (), RIGHT (), INSTR (), LTRIM (), RTRIM (), TRIM (). Date Functions: NOW (), DATE (), MONTH (), MONTHNAME (), YEAR (), DAY (), DAYNAME (). Aggregate Functions: MAX (), MIN (), AVG (), SUM (), COUNT (); using COUNT (*). Querying and manipulating data using Group by, Having, Order by. Operations on Relations - Union, Intersection, Minus, Cartesian Product, JOIN

Chapter 2: Data Handling using Pandas – I Introduction to Python libraries- Pandas, NumPy, Matplotlib. Data structures in Pandas - Series and DataFrames. Series: Creation of Series from – and array, dictionary, scalar value; mathematical operations; Head and Tail functions; Selection, Indexing, and Slicing. DataFrames: creation - from the dictionary of Series, list of dictionaries, Text/CSV files; display; iteration; Operations on Rows and columns: add, select, delete, rename; Head and Tail functions; Indexing using Labels, Boolean Indexing; Styling & Formatting data, Head and Tail functions; Joining, Merging and Concatenations. Importing/Exporting Data between CSV files and DataFrames.

Chapter 3: Data Handling using Pandas – II Descriptive Statistics: max, min, count, sum, mean, median, mode, quartile, Standard deviation, variance. DataFrame operations: Aggregation, group by, Sorting, Deleting and Renaming Index, Pivoting. Handling missing values – dropping and filling. Importing/Exporting Data between MySQL database and Pandas.

Chapter 4: Plotting Data using Matplotlib Purpose of plotting; drawing and saving the following types of plots using Matplotlib – line plot, bar graph, histogram, pie chart, frequency polygon, box plot, and scatter plot. Customizing plots: color, style (dashed, dotted), width; adding label, title, and legend in plots.

Chapter 5: Introduction to Computer Networks Introduction to Networks, Types of networks: LAN, MAN, WAN. Network Devices: modem, hub, switch, repeater, router, gateway Network Topologies: Star, Bus, Tree, Mesh. Introduction to Internet, URL, WWW, and its applications- Web, email, Chat, VoIP. Website: Introduction, the difference between a website and webpage, static vs dynamic web page, web server, and hosting of a website. Web Browsers: Introduction, commonly used browsers, browser settings, add-ons and plug-ins, cookies.

Chapter 6: Societal Impacts Digital footprint, Etiquettes for Net surfing and for communicating through social media, data protection, Intellectual Property Rights (IPR) and their violation, plagiarism licensing and copyrights, Free and Open Source Software (FOSS), Cybercrime and cyber laws, hacking, phishing, cyberbullying, Overview of Indian IT Act, preventing cybercrime. E-waste its a hazard and management Awareness about health concerns related to the usage of technology like effect on eyesight, physiological issues, and ergonomic aspects.

(8)

Contd... Cont... Chapter 10: Data Communication Concept of communication, Types of Data Communication, switching techniques Communication Media: Wired Technologies – Twisted pair cable, Co-axial cable, Ethernet Cable, Optical Fibre; Introduction to mobile telecommunication technologies Wireless Technologies – Bluetooth, WLAN, Infrared, Microwave Network Protocol: Need for Protocol, Categorization and Examples of protocol, HTTP, FTP, IP, PPP; electronic mail protocol Concept of Channel, Bandwidth (Hz, KHz, MHz) and Data Transfer rate (bps, Kbps, Mbps, Gbps, Tbps)

Chapter 11: Security Aspects Threats and prevention: Viruses, Worms, Trojan horse, Spam, Cookies, Adware, Firewall, http vs https Network Security Concepts: Firewall, Cookies, Hackers and Crackers Antivirus and their workings Network security threats: Denial of service, Intrusion problems, Snooping, Eavesdropping 

(9)

Exclusive School Books Suppliers WEST KAMENG

MAHARASHTRA

ANDHRA PRADESH

Sri Vikas Book Centre, 9848571114, 9440715700,

PUNE

ASSAM

JALNA

Dutta Book Stall, 8729948473

KARNATAKA

BANGLORE

Satish Agencies, 8861630123

RAJKOT

Royal Stationers, 9824207514

CHENNAI

GUJRAT

HYDERABAD KOLKATA

ANDHRA PRADESH

GUWAHATI

PATNA

INDORE

Akshaya Books Corner, 9666155555

TAMIL NADU

Bookmark-IT, 7305151653

TELANGANA

Sri Balaji Book Depot , 9676996199, (040) 27613300

WEST BENGAL

United Book House, 9831344622

Bhaiya Industries, 9893326853, Sushil Prakashan,(0731) 2503333, 2535892, 9425322330, Bhaiya Store, 9425318103, Arun Prakashan, 9424890785, Bhaiya Book Centre, 9424081874, Seva Suppliers, 9826451052

ANDAMAN & NICOBAR ISLAND PORTBLAIR

Anil Paper Mart, 9422722522, (02482) 230733

Our Distributors

VISAKHAPATHAM JBD Educational, 9246632691, 9246633693, Sri Rajeshwari Book Link, 9848036014 VIJAYAWADA

Madhusheela Books & Stationery, 7875899892

Krishna Book Centre, 9474205570, Kumar Book Depot, 9932082455, Kumar Book Depot, 9932082455, Sree aditya Book Centre, 8332972720, 7013300914

ASSAM

Book Emporium, 9675972993, 6000763186, Ashok Publication, 7896141127, Kayaan Enterprises, (0361) 2630443, Orchid Book house, 9864624209, Newco, 9864178188

JABALPUR

Vinay Pustak Sadan, 8962362667, Anand Books and Stationers, 9425323508

SAGAR

Princi Book Depot, Sagar, 9977277011

KATNI

Shri Mahavir Agency, 9425363412

BHOPAL

Gupta Brother, 9644482444

UJJAIN

BIHAR

Nova Publisher & Distributors, (0612) 2666404, Shri Durga Pustak Mandir, 9334477386, Sharda Pustak Bhandar, 9334259293, Vikas Book Depot, 9504780402, Alka Book Agency, 9835655005, Metro Book(E&C), Ishu Pustak Bhandar, 8294576789, Gyan Ganga Limited, 6203900312, Ishu Pustak Bhandar, ( E & C ), 9334186300/8294576789

PUNE

Shreenath Book Depot, 9827544045

MAHARASHTRA

Natraj Book Depot, (020) 24485054, 9890054092, Vikas Book House, 9921331187, Pravin Sales, 9890683475, New Saraswati Granth Bhandar, 9422323859, Akshar Books & Stationary, 7385089789, Vardhaman Educational, 9860574354, Yash Book Centre, 9890156763, Pragati Book Centre, (ISC), 9850039311, Praveen Sales, Pragati Book Centre, Pune ( E & C ), 9850039311 Shree Sainath Agencies, 7350294089, Maya Book Centre, (ISC), 9372360150 Vidyarthi Sales Agencies, 9819776110, New Student Agencies, 7045065799, Shivam Books & Stationery, 8619805332

Pustak Bhandar, 7870834225

CHATTISGARH

AURANGABAD MUMBAI

AMBIKAPUR

Saini Brothers, 9425582561, M.P Department Stores, 9425254264

JALGAON

BOKARO BHILAI

Bokaro Student Friends Pvt. Ltd, Bokaro, 7277931285 Anil Book Depot, 9425234260

LATUR KOLHAPUR

Yash Book House, 9637936999, Shri Ganesh Pustakalay, 9730172188 Granth the Book World, 9922295522

KORBA

Kitab Ghar, Korba ( E & C ), 9425226528

NANDED

MUZAFFARPUR

DURG

RAIPUR RAIGARH DELHI

Bhagwati Bhawani Book Depot, 0788-2327620, 9827473100

NAGPUR

Sharma Book Depot & Stat. (ISC), 9421393040

Laxmi Pustakalay and Stationers, (0712) 2727354, Vijay Book Depot, 9860122094

Shri Ramdev Traders, 9981761797, Gupta Pustak Mandir, 7974220323, Anil Publication, 9691618258/7999078802

NASHIK

Renuka Book distributor, 9765406133, Novelty Book Depot, 9657690220, Karamveer Book Depot, 9923966466, Arun Book & Stationers, 9423110953 Abhang Pustakalaya, 9823470756/9175940756 Rahul Book Centre, 9970849681, New India Book House, 9623123458

DELHI

YAVATMAL

Shri Ganesh Pustkalaya, 9423131275

Sindhu Book Deopt, 9981935763

DHULE

Mittal Books, (011) 23288887, 9899037390, Singhania Book & Stationer, 9212028238, AoneBooks, New Delhi, 8800497047, Radhey Book Depot, 9818314141, Batheja Super Store, 9871833924, Lov Dev & Sons, Delhi ( E & C ), 9811182352, Zombozone, 9871274082, LDS Marketing, 9811182352/9999353491

VASAI

Navjeevan Book Stall, 7020525561

Prime Book Centre, Vasai, 9890293662

ODISHA A. K. Mishra Agencies, 9437025991, 9437081319

GUJARAT

CUTTACK

BHAVNAGAR DAHOD VAPI

Patel Book, 9898184248, 9824386112, 9825900335, Zaveri Agency, 9979897312, 9979890330, Hardik Book Agency, (ISC) 079-24110043, 9904659821 Samir Book Stall, Bhavnagar (ISC) 9586305305 Collegian Book Corner, 9925501981 Goutam Book Sellers, 9081790813

BHUBANESHWAR M/s Pragnya, 8847888616, 9437943777, Padmalaya, 9437026922, Bidyashree, 9937017070, Books Godown, 7894281110 BARIPADA Trimurti Book World, 9437034735 KEONJHAR Students corner, 7008435418

VALSAD NAVSARI

Mahavir Stationers, 9429474177 College Store, (ISC) NO CALL 02637-258642, 9825099121

AMBALA PATIALA

VADODARA

Umakant Book Sellers & Stationer, 9624920709

HARYANA

FEROZPUR LUDHIANA

ROHTAK

Manish Traders, 9812556687, Swami Kitab Ghar, 9355611088,

CHANDIGARH

REWARI

Sanjay book depot, 9255447231

AHMEDABAD

SURAT

BALLABGARH HISAR BHUNA

BOKARO RANCHI DUMKA HUBLI BANGLORE

BELLERI ERNAKULAM KOTTAYAM TRIVANDRUM CALICUT

PUNJAB

Shopping Point, 9824108663

JALANDHAR

Babu Ram Pradeep Kumar, 9813214692

Bharat Book Depot, 7988455354 Goel Sons, 9463619978, Adarsh Enterprises, 9814347613

Cheap Book Store, 9872223458, 9878258592, City Book Shop, 9417440753, Subhash Book Depot, 9876453625, Paramvir Enterprises, 9878626248 Sita Ram book Depot, 9463039199, 7696141911 Amit Book, 9815807871, Gupta Brothers, 9888200206, Bhatia Book Centre, 9815277131 Mohindra Book Depot, 9814920226

RAJASTHAN

Laxmi General Store, Ajmer, 0145- 2428942 9460652197 Vardhman Book Depot, 9571365020, 8003221190 Raj Traders, 9309232829

Kashi Ram Kishan lal, 9289504004, 8920567245 Natraj Book Distributors, 7988917452

AJMER KOTA

Khurana Book Store, 9896572520

BHILWARA

JAMMU

JAIPUR

Sahitya Sangam, 9419190177

UDAIPUR

Nakoda Book Depot, (01482) 243653, 9214983594, Alankar Book Depot, 9414707462 Ravi Enterprises, 9829060694, Saraswati Book House, (0141) 2610823, 9829811155, Goyal Book Distt., 9460983939, 9414782130 Sunil Book Store, 9828682260

Crown Book Distributor & Publishers, (0651) 2213735, 9431173904, Pustak Mandir, 9431115138, Vidyarthi Pustak Bhandar, 9431310228

AGARTALA

Book Corner, 8794894165, 8984657146, Book Emporium, 9089230412

KARNATAKA

COIMBATORE

JHARKHAND

JODHPUR

Bokaro Student Friends, (0654) 2233094, 7360021503, Bharati Bhawan Agencies, 9431740797

Krishna book house, 9739847334, Hema Book Stores, 9986767000, Sapna Book House Pvt. Ltd., 9980513242, Hema Book World, (Chamrajpet) (ISC) 080-40905110, 9945731121 Chatinya book centre, 9886064731

PUDUCHERRY

Academic Book House, (0484) 2376613, H & C Store, 9864196344, Surya Book House, 9847124217, 9847238314 Book Centre, (0481) 2566992 Academic Book House, (0471) 2333349, 9447063349, Ponni Book Stall, 9037591721

TRICHY

Aman Book Stall, (0495) 2721282,

MADHYA PRADESH

CHHINDWARA

Pustak Bhawan, ( E & C ), 8982150100

GWALIOR

Agarwal Book Depot, 9425116210

TRIPURA

TAMIL NADU

Renuka Book Distributor, (0836) 2244124, Vidyamandir Book Distributors, 9980773976 CHENNAI

KERALA

Second Hand Book Stall, 9460004745

SALEM

THENI MADURAI VELLORE

HYDERABAD

Majestic Book House, (0422) 2384333, CBSC Book Shop, 9585979752

Arraba Book Traders, (044) 25387868, 9841459105, M.R. Book Store (044) 25364596, Kalaimagal Store, (044) 5544072, 9940619404, Vijaya Stores, 9381037417, Bookmark It-Books & Stat. Store, 7305151653, M.K. Store, 9840030099, Tiger Books Pvt. Ltd., 9710447000, New Mylai Stationers, 9841313062, Prince Book House, Chennai, 0444-2053926, 9952068491, S K Publishers & Distributors, 9789865544, Dharma Book Shop, 8667227171 Sri Lakshmi Book Seller, 7871555145 Pattu book centre, 9894816280

P.R.Sons Book Seller, 9443370597, Rasi Publication, 9894816280 Maya Book Centre, 9443929274 Selvi Book Shoppe, 9843057435, Jayam Book Centre, 9894658036 G.K book centre and collections, 9894517994

TELANGANA

Sri Balaji Book Depot, (040) 27613300, 9866355473, Shah Book House, 9849564564 Vishal Book Distributors, 9246333166, Himalaya Book World, 7032578527

( 10 )

0808

VIJAYAWADA

Contd... UTTARAKHAND

GORAKHPUR

Central Book House, 9935454590, Friends & Co., 9450277154, Dinesh book depot, 9125818274, Friends & Co., 9450277154

DEHRADUN

Inder Book Agencies, 9634045280, Amar Book Depot , 8130491477, Goyal Book Store, 9897318047, New National Book House, 9897830283/9720590054

JHANSI

Bhanu Book Depot, 9415031340

MUSSORIE

Ram Saran Dass Chanda kiran, 0135-2632785, 9761344588

KANPUR

Radha News Agency, 8957247427, Raj Book Dist., 9235616506, H K Book Distributors, 9935146730, H K Book Distributors, 9506033137/9935146730

UTTAR PRADESH

LUCKNOW

Vyapar Sadan, 7607102462, Om Book Depot, 7705871398, Azad Book Depot Pvt. Ltd., 7317000250, Book Sadan, 9839487327, Rama Book Depot(Retail), 7355078254,

Ashirwad Book Depot, 9235501197, Book.com, 7458922755, Universal Books,

9450302161, Sheetla Book Agency, 9235832418, Vidyarthi Kendra Publisher & Distributor Pvt Ltd, (Gold), 9554967415, Tripathi Book House, 9415425943

AGRA

Sparsh Book Agency, 9412257817, Om Pustak Mandir, (0562) 2464014, 9319117771,

MEERUT

ALLAHABAD

Mehrotra Book Agency, (0532) 2266865, 9415636890

NOIDA

Prozo (Global Edu4 Share Pvt. Ltd), 9318395520, Goyal Books Overseas Pvt.Ltd., 1204655555 9873387003

AZAMGARH

Sasta Sahitya Bhandar, 9450029674

PRAYAGRAJ

Kanhaiya Pustak Bhawan, 9415317109

ALIGARH

K.B.C.L. Agarwal, 9897124960, Shaligram Agencies, 9412317800, New Vimal Books, 9997398868, T.I.C Book centre, 9808039570

MAWANA

Subhash Book Depot, 9760262264

BULANDSHAHAR

Rastogi Book Depot, 9837053462/9368978202

BALRAMPUR

Universal Book Center, 8933826726

KOLKATA

BAREILLY

Siksha Prakashan, 9837829284

RENUKOOT

HARDOI

Mittal Pustak Kendra, 9838201466

DEORIA

Kanodia Book Depot, 9415277835

COOCH BEHAR

S.B. Book Distributor, Cooch behar, 9002670771

VARANASI

Gupta Books, 8707225564, Bookman & Company, 9935194495/7668899901

KHARAGPUR

Subhani Book Store, 9046891334

MATHURA

Sapra Traders, 9410076716, Vijay Book House , 9897254292

SILIGURI

Agarwal Book House, 9832038727, Modern Book Agency, 8145578772

FARRUKHABAD

Anurag Book Agencies, 8844007575

DINAJPUR

Krishna Book House, 7031748945

NAJIBABAD

Gupta News Agency, 8868932500, Gupta News Agency, ( E & C ), 8868932500

MURSHIDABAD

New Book House, 8944876176

DHAMPUR

Ramkumar Mahaveer Prasad, 9411942550

Sanjay Publication, 8126699922 Arti book centre, 8630128856, Panchsheel Books, 9412257962, Bhagwati Book Store, (E & C), 9149081912

Ideal Book Depot, (0121) 4059252, 9837066307

WEST BENGAL Oriental Publishers & Distributor (033) 40628367, Katha 'O' Kahini, (033) 22196313, 22419071, Saha Book House, (033), 22193671, 9333416484, United Book House, 9831344622, Bijay Pustak Bhandar, 8961260603, Shawan Books Distributors, 8336820363, Krishna Book House, 9123083874

Om Stationers, 7007326732

Entrance & Competition Distributors PATNA

BIHAR

CUTTAK

A.K.Mishra Agencies, 9437025991

Metro Books Corner, 9431647013, Alka Book Agency, 9835655005, Vikas Book Depot, 9504780402

BHUBANESHWAR

M/s Pragnya, 9437943777

CHATTISGARH KORBA

Kitab Ghar, 9425226528, Shri Ramdev Traders, 9981761797

PUNJAB JALANDHAR

Cheap Book Store, 9872223458, 9878258592

DELHI

RAJASTHAN

DELHI

Singhania Book & Stationer, 9212028238, Radhey Book depot, 9818314141, The KOTA Book Shop, 9310262701, Mittal Books, 9899037390, Lov Dev & Sons, 9999353491

Vardhman Book Depot, 9571365020, Raj Traders, 9309232829

NEW DELHI

Anupam Sales, 9560504617, A ONE BOOKS, 8800497047

Goyal Book Distributors, 9414782130

JAIPUR

HARYANA AMBALA

BOKARO

UTTAR PRADESH

Bharat Book Depot, 7988455354

AGRA

BHAGWATI BOOK STORE, 9149081912, Sparsh Book Agency, 9412257817, Sanjay Publication, 8126699922

JHARKHAND

ALIGARH

New Vimal Books, 9997398868

Bokaro Student Friends Pvt. Ltd, 7360021503

ALLAHABAD

Mehrotra Book Agency, (532) 2266865, 9415636890

MADHYA PRADESH

GORAKHPUR

Central Book House, 9935454590

INDORE

Bhaiya Industries, 9109120101

KANPUR

Raj Book Dist, 9235616506

CHHINDWARA

Pustak Bhawan, 9827255997

LUCKNOW

Azad Book Depot PVT LTD, 7317000250, Rama Book Depot(Retail), 7355078254 Ashirwad Book Depot , 9235501197, Book Sadan, 8318643277, Book.com , 7458922755, Sheetla Book Agency, 9235832418

MAHARASHTRA

PRAYAGRAJ

Format Center, 9335115561, Garg Brothers Trading & Services Pvt. Ltd., 7388100499

NAGPUR

Laxmi Pustakalay and Stationers, (0712) 2727354

PUNE

Pragati Book Centre, 9850039311

MUMBAI

New Student Agencies LLP, 7045065799

ODISHA

Inder Book Agancies, 9634045280

WEST BENGAL KOLKATA

Bijay Pustak Bhandar Pvt. Ltd., 8961260603, Saha Book House, 9674827254 United Book House, 9831344622, Techno World, 9830168159

Trimurti Book World, 9437034735

0808

BARIPADA

UTTAR PRADESH DEHRADUN

( 11 )

CUET (UG) Exam Paper 2023 National Testing Agency Held on 16th June 2023

COMPUTER SCIENCE/INFORMATICS PRACTICES Solved

(This includes Questions pertaining to Domain Specific Subject only)

Max. Marks : 200

Time allowed : 45 Minutes

Note : Only refer infomatic practice Questions instead of Computer Science. General Instructions:

(i) This paper consists of 25 MCQs, attempt any 20 out of 25. (ii) Correct answer or the most appropriate answer: Four marks (+4) . (iii) Any incorrect option marked will be given minus One mark (–1) . (iv) Unanswered/Marked for Review will be given No mark (0) . (v) If more than one option is found to be correct then Four marks (+4) will be awarded to only those who have marked any of the correct options . (vi) If all options are found to be correct then Four marks (+4) will be awarded to all those who have attempted the question . (vii) If none of the options is found correct or a Question is found to be wrong or a Question is dropped then all candidates who have appeared will be given Four marks (+4). (viIi) Calculator / any electronic gadgets are not permitted . Section : Compulsory 1. Which one of the following statement is not true in context of relational data model? (1) Foreign Key can take NULL Value (2) A database schema is the design of a database (3) A tuple is a unique entity whereas attribute values can be duplicate in the table (4) If no single attribute in a relation is able to uniquely distinguish the tuples, then it is not possible to form a Primary Key 2. The statement in SQL which allows to change the definition of a table is ............... : (1) ALTER (2) UPDATE (3) CREATE (4) SELECT 3. Which of the following block always execute regardless of exception occurrence? (1) try block (2) finally block (3) else block (4) except block 4. NULL is ........ : (1) the same as 0 for integer (2) the same as blank for character (3) the same as 0 for integer and blank for character (4) Unknown value 5. What will be the output when applying following MySQL command? SELECT LEFT(“UNIVERSITY”, 5); (1) UNIVY (2) UNIVE (3) RSITY (4) UVYNIV 6. When pickle.load ( ) function is used. it generates exception of EOF (End of File). In which two ways this exception could be handled? A. with statement B. try and except C. avoid EOF exception D. assert E. reload

Choose the correct answer from the options given below: (1) A and C only (2) C and E only (3) A and B only (4) D and E only 7. Identify the error/errors in the following code: A. Line 1- import pickle B. Line 2 - data=[‘one’, 2, [3,4,5]] C. Line 3 - with open(‘data2.dat, ‘rb’) as f D. Line 4 - pickle.dump(data, f) Choose the correct answer from the options given below: (1) A, B and C only (2) A and B only (3) C and D only (4) A and C only 8. Match List I with List II: List -I

List - II

(A)

char (n)

(I)

for numbers

(B)

Int

(II)

fixed numbers characters

(C)

varchar (n)

(III)

variable numbers of characters

(D)

float

(IV)

for fractional numbers

of

Choose the correct answer from the options given below: (1) (A)-(II), (B)-(I), (C)-(III), (D)-(IV) (2) (A)-(I), (B)-(II), (C)-(III), (D)-(IV) (3) (A)-(I), (B)-(IV), (C)-(II), (D)-(III) (4) (A)-(III), (B)-(II), (C)-(IV), (D)-(I) 9. Meta-data is also known as: (1) Database Instance (2) Data Constraint (3) Database Schema (4) Data Dictionary

13 13

CUET (UG) Exam Paper 2023

10. Match List I with List II:

15. Match List I with List II:

List -I

List - II

(A)

IP Address

(I)

198.20.2.18

(B)

MAC Address

(II)

12:CD:3E:56:5F:C3

(C)

Network topol- (III) ogy requires central controller or hub

Star

Internet an ex- (IV) ample of this topology

Mesh

(D)

Choose the correct answer from the options given below: (1) (A)-(I), (B)-(II), (C)-(III), (D)-(IV) (2) (A)-(IV), (B)-(III), (C)-(II), (D)-(I) (3) (A)-(I), (B)-(III), (C)-(II), (D)-(IV) (4) (A)-(III), (B)-(I), (C)-(II), (D)-(IV) 11. Arrange the following steps in sequential order of handling exception: A. Exception is raised B. Create an exception object C. Executes the code D. Runtime system searches for exception handler E. Program terminates Choose the correct answer from the options given below: (1) A, B, D, C, E (2) B, A, D, C, E (3) A, D, B, C, E (4) A, B, C, E, D 12. Which of the following can be handled by a gateway? (1) Protocol conversion (2) Packet resizing (3) Data encapsulation (4) regeneration of weakened signals 13. What will be the correct output, When applying ROUND( ) function in the following MySQL command: SELECT ROUND(2912.564, 1) (1) 2912.5 (2) 2912.56 (3) 2912.6 (4) 2912 14. Match List I with List II: List -I

List - II

(A)

Repeater

(I)

device that receive data, analyse and transmit it to other networks

(B)

Switch

(II)

Serves as the entry/exit point of a network

(C)

Router

(III)

regenerate the signals on the cables to which it is connected

(D)

Gateway

(IV)

device used to connect multiple computers

Choose the correct answer from the options given below: (1) (A)-(II), (B)-(IV), (C)-(III), (D)-(I) (2) (A)-(III), (B)-(IV), (C)-(I), (D)-(II) (3) (A)-(I), (B)-(II), (C)-(III), (D)-(IV) (4) (A)-(II), (B)-(IV), (C)-(I), (D)-(III)

List -I

List - II

(A)

IP Address

(I)

A name against IP address

(B)

MAC Address

(II)

Physical or Hardware address

(C)

URL

(III)

A unique address to uniquely identify each node in a network

(D)

Domain Name (IV)

A unique address for each resource located on the web

Choose the correct answer from the options given below: (1) (A)-(I), (B)-(II), (C)-(III), (D)-(IV) (2) (A)-(IV), (B)-(III), (C)-(I), (D)-(II) (3) (A)-(III), (B)-(IV), (C)-(II), (D)-(I) (4) (A)-(III), (B)-(II), (C)-(IV), (D)-(I) Section : Computer Science 1. A .............. allows to insert/delete elements from front as well as rear: (1) Stack (2) Deque (3) Quene (4) List 2. For the table Emp_Salary, you need to modify a column, choose the correct SQL statement that modify the datatype of column salary from int to float (1) Alter table Emp_Salary add column salary float (2) Alter table Emp_Salary modify column salary float (3) Alter table Emp_Salary change column salary float (4) Alter table Emp_Salary modify salary float 3. Which of the following keys should be unique in Database? A. Foreign Key B. Primary Key C. Candidate Key D. Composite Primary Key Choose the correct answer from the options given below: (1) A and C only (2) A and B only (3) B, C and D only (4) A, C and D only 4. What is time complexity for n elements in an insertion sort: (1) n (2) n2 (3) log2 n (4) 1 5. How many total number of swaps will be done while sorting the given list using insertion sort list 9

6

12

1

–7

3

(1) 13 (2) 5 (3) 11 (4) 9 6. It is easy to identify and isolate the fault in which of the following topology (1) Mesh (2) Bus (3) Ring (4) Hybrid 7. Which of the following elements would cause collision in hashing if we apply the hash function List[i]%10, for the list [2,4,18,24,30,45,54]

14

OSWAAL CUET (UG) Chapterwise Question Bank INFORMATICS PRACTICES

A. 2, 4 B. 24, 54 C. 4, 24 D. 24, 30 E. 45, 54 Choose the correct answer from the options given below: (1) A and B only (2) B and C only (3) A, D and E only (4) A, B and C only 8. Which elements will remain in the stack after perfroming following operations PUSH (4) POP ( ) PUSH (6) PUSH (2) PUSH (8) POP ( ) (1)

(3)

8

(2)

4

2

8

6

2

4

6

2

(4)

6

2 4

9. The number of attributes in a relation is called (1) cardinality (2) Domain (3) Tuple (4) Degree 10. What will front and rear of quene contain after execution of following statements, the Queue already had the given elements in FIFO order 1→8→7→9 ↑ ↑ F R enqueue (11) enqueue (3) enqueue (6) dequeue ( ) dequeue ( ) enqueuc (9) enqueue (8) dequeue ( ) (1) Front-1 Rear-8 (2) Front- 8 Rear-1 (3) Front-9 Rear-8 (4) Front- 8 Rear-9 11. Which of the following is not a SQL Data Definition Language (DDL) statement? (1) CREATE TABLE (2) ALTER TABLE (3) DROP TABLE (4) SELECT 12. Which of the following statement is correct to insert a new record in the table student with given table structure: Student Name, Class, rollno, section (1) insert into student ('Abhay’, ‘X’, 1, ‘A'); (2) insert into student(name, class) values (‘Abhay’, X’ ); (3) insert into table student values (‘Abhay’, ‘X’, 1, ‘A'); (4) insert values into student, (‘Abhay’, ‘X’, 1, A’);

13. Evaluate the given postfix expression: 6 4 1 * 2 / + (1) 10 (2) 8 (3) 6 (4) 7 14. Name the command when we want to use the database, dl: (1) create database d1; (2) modify database d1; (3) update database d1; (4) use dl; 15. Match List I with List II: List -I

List - II

(A)

Stack

(I)

Insert at end and deletion from end

(B)

Deque

(II)

Insert at end and deletion from front

(C)

Binary File

(III)

Insertion and deletion from any end

(D)

Queue

(IV)

Stored in terms of bytes

Choose the correct answer from the options given below: (1) (A)-(II), (B)-(I), (C)-(IV), (D)-(III) (2) (A)-(II), (B)-(I), (C)-(III), (D)-(IV) (3) (A)-(I), (B)-(III), (C)-(IV), (D)-(II) (4) (A)-(I), (B)-(III), (C)-(II), (D)-(IV) 16. In Binary search at each iteration a mid index is computed by taking average of first and last index of the part of list under consideration, What will be values at mid index if element 2 is to be searched from given list: L=[2, 3, 5, 7, 10, 11, 12, 17, 19, 23, 29, 31, 37, 41, 43] (1) 19, 10, 3, 2 (2) 17, 7, 3, 2 (3) 12, 3, 2 (4) 23, 10, 2 17. Which one of the following represent a valid combination for the measurement of the efficiency of an algorithm? (1) Processor and Memory (2) Complexity and Capacity (3) Time and Space (4) Data and Space 18. Match List I with List II: List -I

List - II

(A)

Hub/Switch

(I)

(B)

Router

(II)

(C) (D)

Modem Server

(III) (IV)

When one LAN is connected to the other LAN Large number of computers in the building In the server room Each building

Choose the correct answer from the options given below: (1) (A)-(IV), (B)-(III), (C)-(II), (D)-(I) (2) (A)-(IV), (B)-(I), (C)-(III), (D)-(II) (3) (A)-(IV), (B)-(I), (C)-(II), (D)-(III) (4) (A)-(II), (B)-(III), (C)-(IV), (D)-(I)

CUET (UG) Exam Paper 2023

19. The minimum and maximum number of comparisons done by linear search algorithm are: (1) 0 and n (where n is the total number of elements) (2) 1 and n – 1 (where n is the total number of elements) (3) 0 and n – 1 (where n is the total number of elements) (4) 1 and n (where n is the total number of elements) 20. For a list with n elements bubble sort takes ........ passes to sort the elements in the list (1) n+1 (2) n (3) n – 1 (4) can’t be determined 21. Data refers to unorganised facts that can be processed to generate meaningful result or information. Data are stored in computer in the electronic form in some storage devices such as HDD, SSD, Pen Drive, CD/DVD and memory card. There are two types of data, structured and unstructured. Structured data is where data stored in some format. Unstructured data are not stored in an organised format. There are some statistical technique to process the data. ICT technologies helps in the generation of large volume of data. Based on the above paragraph, answer the following questions: What ICT stands for (1) Information and Communication Technology (2) Information and Computing Technology (3) Internet and Computer Technology (4) Internet and Communication Technology 22. Data refers to unorganised facts that can be processed to generate meaningful result or information. Data are stored in computer in the electronic form in some storage devices such as HDD, SSD, Pen Drive, CD/DVD and memory card. There are two types of data, structured and unstructured. Structured data is where data stored in some format. Unstructured data are not stored in an organised format. There are some statistical technique to process the data. ICT technologies helps in the generation of large volume of data. Based on the above paragraph. answer the following questions: Which of the following is not a Data storage device? (1) CD/DVD (2) HDD (3) SSD (4) CPU 23. Data refers to unorganised facts that can be processed to generate meaningful result or information. Data are stored in computer in the electronic form in some storage devices such as HDD, SSD, Pen Drive, CD/DVD and memory card. There are two types of data, structured and unstructured. Structured data is where data stored in some format. Unstructured data are not stored in an organised format. There are some statistical technique to process the data. ICT technologies helps in the generation of large volume of data. Based on the above paragraph. answer the following questions: Which of the following is an unstructured data? (1) Books data at shop (2) Business reports (3) Tabular data (4) Kitchen inventory data

15 15 24. Data refers to unorganised facts that can be processed to generate meaningful result or information. Data are stored in computer in the electronic form in some storage devices such as HDD, SSD, Pen Drive, CD/DVD and memory card. There are two types of data, structured and unstructured. Structured data is where data stored in some format. Unstructured data are not stored in an organised format. There are some statistical technique to process the data. ICT technologies helps in the generation of large volume of data. Based on the above paragraph. answer the following questions: Which of the following is a structure data? (1) Writing tweets (2) Recording a video (3) Marking attendance by teacher (4) Text document 25. Data refers to unorganised facts that can be processed to generate meaningful result or information. Data are stored in computer in the electronic form in some storage devices such as HDD, SSD, Pen Drive, CD/DVD and memory card. There are two types of data, structured and unstructured. Structured data is where data stored in some format. Unstructured data are not stored in an organised format. There are some statistical technique to process the data. ICT technologies helps in the generation of large volume of data. Based on the above paragraph. answer the following questions: Which of the following is a data processing/data summerisation techniques? (1) Mean squared error, max, min (2) mean, median, mode, standard deviation (3) sum, average, max (4) count, left, right, power 26. Rohan has written a python code where he has created a function, searchword( ) to read a text file “notes.txt” and display words having length 4 or less than 4 characters. In writing code some parts are missing. Based on that answer questions. def searchword( ): count =0 file = open(“notes.txt”, ‘_’) # statement1 line = file. __________ # statement2 word = __________ # statement3 for cin word: if __________ : # statement4 print ( c) __________ # statement5 Mode of opening the file in #statement1 is: (1) a (2) w (3) r (4) ab 27. Rohan has written a python code where he has created a function. searchword( ) to read a text file “notes.txt” and display words having length 4 or less than 4 characters. In writing code some parts are missing. Based on that answer questions. def searchword( ): count =0 file = open(“notes.txt”, ‘_’) # statement1 line = file. __________ # statement2

16

OSWAAL CUET (UG) Chapterwise Question Bank INFORMATICS PRACTICES

word = __________ # statement3 for cin word: if __________ : # statement4 print ( c) __________ # statement5 Fill in the blank in #statement2 to read the data from the file. (1) read( ) (2) Read() (3) readlines( ) (4) read.lines( ) 28. Rohan has written a python code where he has created a function, searchword( ) to read a text file “notes.txt” and display words having length 4 or less than 4 characters. In writing code some parts are missing. Based on that answer questions. def searchword( ): count =0 file = open(“notes.txt”, ‘_’) # statement1 line = file. __________ # statement2 word = __________ # statement3 for cin word: if __________ : # statement4 print ( c) __________ # statement5 Fill in the blanks with #statement3 to read the data word by word (1) line.split (2) line.word( ) (3) split.word( ) (4) line.split( ) 29. Rohan has written a python code where he has created a function, searchword( ) to read a text file “notes.txt” and display words having length 4 or less than 4 characters. In writing code some parts are missing. Based on that answer questions. def searchword( ): count =0 file = open(“notes.txt”, ‘_’) # statement1 line = file. __________ # statement2 word = __________ # statement3 for cin word: if __________ : # statement4 print ( c) __________ # statement5 Fill m the blank in # statement 4 which display the word having lesser than or equal to 4 characters. (1) len(c)=4 (2) len(ec) SELECT LENGTH(‘program‘); Output: 7 (vi) LEFT( ): This function is used to return a specified number of characters from the left of the string. The number of characters returned is determined by the second argument. { Syntax: LEFT(str, len) e.g., mysql > SELECT LEFT (‘Program‘, 4); Output: Prog (vii) RIGHT( ): This function is just opposite of LEFT( ) function. It is used to return a specified number of characters from the right of the string. The number of characters returned is determined by the second argument. { Syntax: RIGHT (str, len) e.g., mysql > SELECT RIGHT (‘Program‘, 4); Output: gram (viii) INSTR( ): This function takes two arguments as str (string) and sub_str (sub string) and returns the position of the first occurrence of a specified sub_str from a given str. { Syntax: INSTR( str, sub_str) e.g., mysql>SELECT INSTR(‘Python Program‘, ‘thon’) as Result; Output: Result 3 (ix) LTRIM( ): This function takes a string argument and returns a new string with all the leading space characters removed. Spaces in the middle or trailing spaces are not removed. { Syntax: LTRIM(str) e.g., mysql > SELECT LTRIM (‘ Python Program’) as Result; Output: Result Python Program (x) RTRIM( ): This function takes a string argument and returns a new string with all the trailing space characters removed. Spaces in the middle or leading space are not removed. { Syntax: RTRIM (str) e.g., mysql > SELECT RTRIM (‘ Python Program ’) as Result; Output: Result Python Program

3 (xi) TRIM( ): This functions enables you to remove leading and trailing white space from string. { Syntax: TRIM (str); e.g., mysql > SELECT TRIM (‘ Python Program ’) as Result; Output: Result Python Program ¾ Date Functions: The date functions are Scan to know used to perform some operations on date that more about this topic is stored in the database. Some common date functions are as follows: (i) NOW( ): This function returns the current date and time in the configured time Date & Time function zone as a string, or a number in the ‘YYYYMM-DD HH: MM: SS’ or ‘YYYYMMDDHHMMSS‘ format. { Syntax: NOW( ) e.g., mysql > SELECT NOW( ); (ii) DATE( ): This function extracts the date value from a date. { Syntax: DATE (date) e.g., mysql > SELECT DATE (‘2020-07-25 03:16:43’); Output: 2020-07-25 (iii) MONTH( ): This function returns the month for date, in the range 1 to 12 for January to December. If it returns 0 then month part of the given date contains NULL. { Syntax: MONTH (date) e.g., mysql >SELECT MONTH (‘2020-07-28‘); Output: 7 (iv) MONTHNAME( ): This function returns the full name of the month for given date. { Syntax: MONTHNAME (date) e.g., mysql > SELECT MONTHNAME (‘2020-07-28‘); Output: July (v) YEAR( ): This function returns the year of the given date. It returns a year value in the range 1000 to 9999. If the date is zero, it returns 0. { Syntax: YEAR(date) e.g., mysql > SELECT YEAR (‘2020-07-28‘); Output: 2020

4 Oswaal CUET (UG) Chapterwise Question Bank (vi) DAY( ): This function returns the day of the month of a given date. If the date argument is zero, it returns 0. In case, the date in NULL, this function returns NULL. { Syntax: DAY(date) Scan to know more about e.g., mysql> SELECT DAY(“2003-03this topic 24”); Output: 24 (vii) DAYNAME () : It returns the name Aggregate Function in of the day from the date. SQL { Syntax: DAYNAME(date) mysql>SELECT DAYNAME (‘2020-07-28‘); Output: Tuesday ¾ Aggregate Functions { An aggregate function performs a calculation on one or more values and returns a single value. { We often use aggregate functions with the GROUP By and HAVING clauses of the SELECT statement. { Except for count(*), aggregate functions totally ignore NULL values and consider all values present in a column. Some aggregate functions are as follows: • MAX() : This function returns the maximum value in selected columns. MAX() function ignores NULL values and considers all values in the calculation. Syntax: SELECT MAX(Column_Name) FROM Table_Name ; • MIN(): This function returns the minimum value in the selected columns. MIN() function ignores NULL values. Syntax: SELECT MIN(Column_Name) FROM Table_Name; • AVG(): This function calculates the average of specified column(s). It ignores NULL values. Syntax: SELECT AVG(Column_Name) FROM Table_Name; • SUM() : This function calculates the sum of all values in the specified columns. It accepts only the expression that evaluates to numeric values also. Syntax : SELECT SUM(Column_Name) FROM Table_Name; • COUNT() : This function returns the number of items found in a set. COUNT(*) function returns a number of rows in a specified table or view that includes the number of duplicates and NULL values. Syntax: SELECT COUNT(*) FROM Table_Name; ¾ GROUP BY Clause : GROUP BY clause is used to group rows returned by SELECT statement into a specified rows or groups. Syntax:

INFORMATICS PRACTICES

SELECT column 1, column 2, ..., Aggregate_function (exp) FROM Table_Name WHERE condition GROUP BY Column_Name; ¾ ORDER BY clause : ORDER BY clause is used to sort a result set returned by a SELECT statement. To sort a result set in ascending order, use ASC Keyword and in descending order, use DESC Keyword. The ORDER BY clause sorts the result set in ascending order by default. { Syntax: SELECT column 1, column 2, ... FROM Table_Name ORDER BY Column_Name ; ¾ Having Clause: HAVING clause is oftenly used with the GROUP BY rows based on a specified condition. { Syntax: SELECT column 1, column 2, ..., Aggregate_function (Exp) FROM Table_Name GROUP BY Column_Name HAVING condition; ¾ Operations on Relation In MySQL, operations on relation typically refer to various operations and queries performed on database tables, which are essentially relations in the context of relational databases. Here are some common operations and queries you can perform on relations (tables) in MySQL: ¾ Union: In MySQL, the UNION operator is used to combine the result sets of two or more SELECT queries into a single result set. It is used to merge rows from multiple tables or queries into one result set, with the condition that each row in the result set is unique. ¾ INTERSECTION: MySQL does not have a built-in INTERSECTION operator like it has for UNION. However, you can achieve the same effect as an intersection operation using other SQL constructs, such as INNER JOIN or subqueries. ¾ MINUS: MySQL does not have a specific MINUS operator like some other database systems (e.g., Oracle) do. However, you can achieve the same effect as a MINUS operation in MySQL by using a combination of LEFT JOIN and IS NULL or by using a NOT IN or NOT EXISTS subquery. These methods allow you to find rows in one table that do not have corresponding rows in another table. ¾ Cartesian product: In MySQL, a Cartesian product is the result of combining every row from one table with every row from another table, creating a result set where each row from the first table is paired with every row from the second table. It can be useful in some cases but is often used accidentally, leading to large result sets. To create a Cartesian product in MySQL, you can use the CROSS JOIN clause. ¾ Join: In MySQL, the JOIN operation is used to combine rows from two or more tables based on a related column between them. This operation allows you to retrieve data from multiple tables as if they were a single table.

5

DATABASE QUERY USING SQL

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. Consider the table given below:  TABLE: STUDENT

[CUET 2022]

ADM

NAME

CLASS

1

Anshuman

12A

2

Arun Lal

12C

3

Sachin

12A

4

Kapil

12B

5

Sunil

12A

6

Virat

12C

(A) cloud (B) cloud has a silver lining (C) Every c (D) very 4. Give the output for the following query:

No. of students

12A

3

12C

2

(B)

November

(C) 10 (D) 11 5. Assume the given tables Dance and Music. Music

(A) Select CLASS, Count (*)From STUDENT Group by CLASS; (B) Select CLASS, Count(*) students’ From STUDENT GROUP by CLASS;

‘No

of

(C) SELECT CLASS, COUNT(No of students) FROM STUDENT Group By CLASS Having count(*)>l; (D) SELECT CLASS, COUNT students’ FROM STUDENT Group By CLASS Having count(*)>l;

(*)

2. Consider the table given below:

‘No

of

S.No.

Name

Class

1

Mehek

8A

2

Mahira

6A

3

Lavanya

7A

4

Sanjay

7A

5

Abhay

8A

S.No

Name

Class

1

Aastha

7B

2

Mahira

6A

3

Mohit

7B

4

Sanjay

7A

Dance

Which operation should be applied to the table to get the following output? [CUET 2022] [CUET 2022]

Table: STUDENT

S.No.

Name

Class

1

Aastha

7A

2

Mahira

6A

3

Mohit

7B

4

Sanjay

7A

ADMNO

NAME

CLASS SCORE

A001

Amit

12A

90

A002

Amit

12B

91

A003

Bhavana

12A

90

A004

Yamini

12A

89

1

Mehek

8A

A005

Ashok

12B

95

3

Lavanya

7A

Which of the following command will display all the records according to their names in descending order and their scores in descending order? (A) (B) (C) (D)

[CUET 2022]

Select Monthname (“2003-11-10”);  (A) October

Based on the above table, which command will give the following result: CLASS

3. Find output for the following: [CUET 2022] Select substr(“Every cloud has a Silver lining”, 7.5);

SELECT * FROM STUDENT ORDER BY NAME, SCORE DESC; SELECT * FROM STUDENT ORDER BY NAME AND SCORE DESC; SELECT * FROM STUDENT ORDER BY NAME DESC, SCORE DESC; SELECT * FROM STUDENT ORDER BY NAME DESC AND SCORE DESC;

5 (A) U

Abhay (B) ∩

8A (C) –

(D) X

6. Write the output of the following SQL command. select round(49.88); (A) 49.88 (B) 9.8

(C) 49.0

(D) 50

7. Which of the following aggregation operation adds up all the values of the attribute? (A) add (B) avg (C) max (D) sum 8. What is returned by INSTR (‘JAVAT POINT’, ‘P’)? (A) 6 (B) 7 (C) POINT (D) JAVAT

6 Oswaal CUET (UG) Chapterwise Question Bank 9. What is the meaning of “GROUP BY” clause in Mysql? (A) Group data by column values (B) Group data by row values (C) Group data by column and row values (D) None of these 10. “COUNT” keyword belongs to which categories in Mysql? (A) Aggregate functions (B) Operators (C) Clauses (D) All of the mentioned 11. The avg() function in MySql is an example of __________ (A) Math function (B) Text function (C) Date function (D) Aggregate function 12. Write the output of the following SQL command. select substr(“COMPUTER”,3,4); (A) MPUT (B) PUTE (C) PU (D) MP 13. To specify condition with a GROUP BY clause, _______ clause is used. (A) USE (B) WHERE (C) HAVING (D) LIKE 14. Which clause is similar to “HAVING” clause in Mysql? (A) SELECT (B) WHERE (C) FROM (D) None of the above 15. What values does the count(*) function ignore? (A) Repetitive values (B) Null values (C) Characters (D) Integers 16. The string function that returns the index of the first occurrence of substring is _____________ (A) INSERT() (B) INSTR() (C) INSTRING() (D) INFSTR() 17. Only _______ functions are used with GROUP BY clause. (A) Text (B) Math (C) Date/Time (D) AGGREGATE 18. The month() function in MySql is an example of .............. (A) Math function (B) Text function (C) Date Function (D) Aggregate Function 19. If column “Fees” contains the data set (5000, 8000, 7500, 5000, 8000), what will be the output after the execution of the given query? [CUET 2023] SELECT SUM (DISTINCT Fees) FROM student; (A) 20500 (B) 10000 (C) 20000 (D) 33500 20. Write the output of the following SQL query: SELECT POW (INSTR(‘Wonders’,’n’),3); [CUET 2023] (A) 12 (B) 9 (C) 16 (D) 25 (B) ASSERTION REASON QUESTIONS Directions: Given below is questions based on Assertion and Reason. Mark the correct choice as (A) Both (A) and (R) are true and (R) is the correct explanation (A) (B) Both (A) and (R) are true and R is not the correct explanation (A) (C) (A) is True but (R) is False (D) (A) is false but (R) is True 1. Assertion (A): SELECT MOD(15, 3); will produce the output as 0 (Zero). Reason (R): POWER( ) function is used to get the power of the given values. 2. Assertion (A): UPPER () function is used to convert the string argument into upper case characters.

INFORMATICS PRACTICES



Reason (R): UCASE () function is used to convert the string argument into lower case characters. 3. Assertion (A): SELECT RIGHT (‘Program‘, 4); Output will be -’ram’. Reason (R): It is used to return a specified number of characters from the right of the string. The number of characters returned is determined by the second argument. 4. Assertion (A): AVG() function calculates the average of specified column(s). Reason (R): It doesn’t ignore NULL values. 5. Assertion (A): The ORDER BY clause sorts the result set in descending order by default. Reason (R): To sort a result set in ascending order, we can use ASC keyword with ORDER BY clause. 6. Assertion (A): SELECT MOD(15, 5); will produce the output as 0 (Zero). Reason (R): MOD( ) function is used to return the remainder of one expression by dividing it to another expression. 7. Assertion (A): HAVING clause is oftenly used with the GROUP BY statement. Reason (R): HAVING clause is used to check specified condition. 8. Assertion (A): MAX() function returns the maximum value in selected columns. Reason (R): MIN() function returns the minimum value in selected columns. 9. Assertion (A): SELECT INSTR(‘Python Program‘, ‘thon’); will produce the output 2. Reason (R): INSTR( ) function takes two arguments as str (string) and sub_str (sub string) and returns the position of the first occurrence of a specified sub_str from a given str. 10. Assertion (A): SUM( ) is an Aggregate function. Reason (R): Multiple row functions work upon group of rows and return one result for the complete set of rows.

[C] CASE BASED QUESTIONS I. Write outputs for SQL queries (i) to (v) which are based on the given table PURCHASE:

TABLE: PURCHASE CNO CNAME

CITY

QUANTITY

DOP

COI

GURPREET

NEW DELHI

150

202206-11

C02

MALIKA HYDERABAD

10

202202-19

C03

NADAR

DALHOUSIE

100

202112-04

C04

SAHIB

CHANDIGARH

50

202110-10

C05

MEHAK

CHANDIGARH

15

202110-20

1.  SELECT LENGTH(CNAME) FROM PURCHASE WHERE QUANTITY>100; (A) 8 (B) 10 (C) 9 (D) 8.0 2. S  ELECT CNAME MONTH(DOP)=3; (A) 2022- 06-11 (C) 2021- 10-20

FROM

PURCHASE

(B) 2021- 12-04 (D) No Output

WHERE

7

DATABASE QUERY USING SQL

3.  SELECT MOD (QUANTITY, DAY(DOP)) PURCHASE WHERE CITY= ‘CHANDIGARH’; (A) 0 (B) 1 (C) 0 (D) 1 15 15 16 16

FROM

4. S  ELECT SUM(QUANTITY) FROM PURCHASE WHERE CITY = ‘CHANDIGARH’; (A) 66 (B) 56 (C) 65 (D) 55 5.  SELECT MAX(QUANTITY) FROM PURCHASE; (A) 50 (B) 150 (C) 100 (D) 10 II. Based on table STUDENT given here, write suitable SQL queries for the following: Roll Name No

Class Gender

City

Marks

1

Abhishek

XI

M

Agra

430

2

Prateek

XII

M

Mumbai 440

3

Sneha

XI

F

Agra

4

Nancy

XII

F

Mumbai 492

5

Himanshu XII

M

Delhi

360

6

Anchal

XI

F

Dubai

256

7

Mehar

X

F

Moscow 324

8

Nishant

X

M

Moscow 429

470

6. Display gender wise highest marks. (A) select max(marks) from student group by gender; (B) select max(marks) from student group by M; (C) select max(marks) from student group by F; (D) select max(mark) from student group by gender; 7. Display city wise lowest marks. (A) select min(mark) from student group by city; (B) select min(marks) from student group by Agra; (C) select min(marks) from student group by city; (D) None of these 8. Display total number of male and female students. (A) select gender, count(gender) from student group by F; (B) select gender, count(gender) from student group by gender; (C) select gender, count(gender) from student group by M; (D) None of these 9. Display sum of marks of students who belong to Agra. (A) select sum(marks) from student where city = “Agra”; (B) select sum(mark) from student where city = “Agra”; (C) select Total(marks) from student where city = “Agra”; (D) None of these 10. Display the details of all students. (A) select all rows from student; (B) select * from student; (C) select * from students; (D) None of these

ANSWER KEY [A] MULTIPLE CHOICE QUESTIONS 1. (D)

2. (C)

3. (A)

4. (B)

5. (A)

6. (D)

7. (D)

8. (B)

9. (A)

10. (A)

11. (D)

12. (A)

13. (C)

14. (B)

15. (B)

16. (B)

17. (D)

18. (C)

19. (A)

20. (B)

1. (B)

2. (C)

3. (D)

8. (B)

9. (D)

10. (A)

8. (B)

9. (A)

10. (B)

[B] ASSERTION REASON QUESTIONS 4. (C)

5. (D)

6. (A)

7. (A)

[C] CASE BASED QUESTIONS 1. (A)

2. (D)

3. (A)

4. (C)

5. (B)

6. (A)

7. (C)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS 1. Option (D) is correct. Explanation: COUNT(*) function returns a number of rows in a specified table or view that includes the number of duplicates and NULL values. 2. Option (C) is correct. Explanation: ORDER BY clause is used to sort a result set returned by a SELECT statement. To sort a result set in ascending order, use ASC Keyword and in descending order, use DESC Keyword. 3. Option (A) is correct. Explanation: substr function extracts a substring from a string and returns a string with given length and position. 4. Option (B) is correct. Explanation: MONTHNAME( ) function returns the full name of the month for given date.

5. Option (A) is correct. Explanation: In MySQL, the UNION operator is used to combine the result sets of two or more SELECT queries into a single result set. It is used to merge rows from multiple tables or queries into one result set, with the condition that each row in the result set is unique. 6. Option (D) is correct. Explanation: The value 49.88 will be rounded to the nearest whole number, which is 50. 7. Option (D) is correct. Explanation: SQL SUM function is used to find out the sum of a field in various records. 8. Option (B) is correct. Explanation: INSTR() is a string function in standard query language (SQL) which returns the starting position or location of a substring or pattern in the given input string.

8 Oswaal CUET (UG) Chapterwise Question Bank

INFORMATICS PRACTICES

9. Option (A) is correct.

20. Option (B) is correct.

Explanation: The GROUP BY Statement in SQL is used to arrange identical data into groups with the help of some functions. i.e if a particular column has same values in different rows then it will arrange these rows in a group. In the query, GROUP BY clause is placed before ORDER BY clause if used any.

Explanation: INSTR() is a string function in standard query language (SQL) which returns the starting position or location of a substring or pattern in the given input string.

10. Option (A) is correct. Explanation: COUNT(*) returns the number of rows in a specified table, and it preserves duplicate rows. It counts each row separately. This includes rows that contain null values. 11. Option (D) is correct. Explanation: : SQL aggregation is the task of collecting a set of values to return a single value. It is done with the help of aggregate functions, such as SUM, COUNT, and AVG. For example, in a database of products, you might want to calculate the average price of the whole inventory. 12. Option (A) is correct. Explanation: The SUBSTR() function extracts some characters from a string. Syntax SUBSTR(string, start, length) 13. Option (C) is correct. Explanation: A HAVING clause in SQL specifies that an SQL SELECT statement must only return rows where aggregate values met the specified conditions. After the aggregating operation, HAVING is applied, filtering out the rows that don’t match the specified conditions. 14. Option (B) is correct. Explanation: WHERE clause is similar to HAVING clause. A HAVING clause in SQL specifies that an SQL SELECT statement must only return rows where aggregate values meet the specified conditions. 15. Option (B) is correct. Explanation: COUNT(*) counts the rows in a table. COUNT(column) counts the entries in a column - ignoring null values. 16. Option (B) is correct. Explanation: The INSTR() function returns the position of the first occurrence of a string in another string. This function performs a case-insensitive search. Syntax INSTR(string1, string2) 17. Option (D) is correct. Explanation: SQL aggregation is the task of collecting a set of values to return a single value. It is done with the help of aggregate functions, such as SUM, COUNT, and AVG. Aggregate functions are used only with GROUP BY clause. 18. Option (C) is correct. Explanation: This function returns the month for date, in the range 1 to 12 for January to December. If it returns 0 then month part of the given date contains NULL. 19. Option (A) is correct. Explanation: sum() function is used to return the total summed value of an expression. DISTINCT statement is used to return only distinct (different) values.

[B] ASSERTION REASON QUESTIONS 1. Option (B) is correct. Explanation: MOD( ) function is used to return the remainder of one number or expression by dividing it to another number or expression. 2. Option (C) is correct. Explanation: UPPER ( ) / UCASE( ) function is used to convert the string argument into upper case characters. 3. Option (D) is correct. Explanation: RIGHT( ) is used to return a specified number of characters from the right of the string. The number of characters returned is determined by the second argument. SELECT RIGHT (‘Program‘, 4);

Output will be ‘gram’ 4. Option (C) is correct. Explanation: AVG() function calculates the average of specified column(s). It ignores NULL values. 5. Option (D) is correct. Explanation: ORDER BY clause is used to sort a result set returned by a SELECT statement. To sort a result set in ascending order, use ASC Keyword and in descending order, use DESC Keyword. The ORDER BY clause sorts the result set in ascending order by default. 6. Option (A) is correct. Explanation: SQL MOD() function is used to get the remainder from a division. 7. Option (A) is correct. Explanation: A HAVING clause in SQL specifies that an SQL SELECT statement must only return rows where aggregate values meet the specified conditions. ... After the aggregating operation, HAVING is applied, filtering out the rows that don’t match the specified conditions. 8. Option (B) is correct. Explanation: MAX() function returns the maximum value in selected columns. MAX() function ignores NULL values and considers all values in the calculation. Syntax: SELECT MAX(Column_Name) FROM Table_Name; MIN() function returns the minimum value in selected columns. MIN() function ignores NULL values Syntax: SELECT MIN(Column_Name) FROM Table_Name; 9. Option (D) is correct. Explanation: SELECT INSTR(‘Python Program‘, ‘thon’); will produce the output 3.

10. Option (A) is correct. Explanation: Multiple row functions are also called Aggregate functions. Multiple row functions work upon group of rows and return one result for the complete set of rows. They are also known as Group Functions.

9

DATABASE QUERY USING SQL

[C] CASE BASED QUESTIONS I. 1. Option (A) is correct. Explanation: 8 2. Option (B) is correct. Explanation: No Output 3. Option (A) is correct. Explanation: 0 15 4. Option (C) is correct. Explanation: 65 5. Option (B) is correct. Explanation: 150 II. 6. Option (A) is correct.

Explanation: select max(marks) from student group by gender; 7. Option (C) is correct. Explanation: select min(marks) from student group by city; 8. Option (B) is correct. Explanation: select gender, count(gender) from student group by gender; 9. Option (A) is correct. Explanation: select sum(marks) from student where city = “Agra”; 10. Option (D) is correct. Explanation: select * from students;

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

2

  Revision Notes:

DATA HANDLING USING PANDAS-I Scan to know

more about ¾ Pandas: The Pandas is a high-perforthis topic mance open-source library for data analysis in Python, developed by Wes McKinney in 2008. Over the years, it has become the de-facto standard library for data analysis Introduction using Python. There are 3 well-established about Pandas Python libraries namely NumPy, Pandas and Matplotlib specially for scientific and analytical use. These libraries allow us to manipulate, transform and visualize data easily and efficiently. Using the Pandas, we can accomplish five typical steps in the processing and analysing of data, regardless of the origin of data. These steps are- load, prepare, manipulate, model and analyse.

¾ Key Features of Pandas: (i) It can process a variety of data sets in different formats: time series, tabular heterogeneous arrays and matrix data. (ii) It facilitates loading and importing data from varied sources such as CSV and DB/SQL. (iii) It can handle a myriad of operations on data sets: sub-setting, slicing, filtering, merging, grouping, re-ordering, and re-shaping. (iv) It can deal with missing data according to the rules defined by the user and developer. (v) It can be used for parsing and managing (conversion) of data as well as modeling and statistical analysis. (vi) It integrates well with other Python libraries such as SciPy. (vii) It delivers fast performance and can be speeded up even more by making use of Cython (C extensions to Python). ¾ NumPy: NumPy, short for “Numerical Python,” is a popular Python library for performing numerical and mathematical operations. It provides support for working with large, multi-dimensional arrays and matrices, along with a collection of mathematical functions to operate on these arrays. NumPy is a fundamental library for scientific and data analysis in Python and is often used in conjunction with other libraries such as SciPy, pandas, and Matplotlib. ¾ Matplotlib: { Matplotlib is an visualization tool library in python especially made it for 2D arrays only. It provides quality figures or diagrams such as line chart, bar graph etc… in both hard copy

and soft copy formats. These diagrams or visualizations are so much interactive. We can design as per our choice. { Matplotlib is a library which we need to import it first to work on it. { It gets worked on all the visualization interface kit such as IPython Shell, NumPy.

¾ Data Structure in Pandas:

Scan to know more about this topic

{ Data Structure is efficient way to store the data. We can perform several operations on the data to make it accessible to the user. In Pandas, there were two types Data Frame and of Data structures namely, Series in Pandas • Series • Data Frame ¾ Series: Series are generally used for 1D data. It is similar to arrays or list. In series, each row is labeled with a index. By Default, the index starts from 0 to N, where N- represents the number of rows.

¾ Data Frame: It is a 2D structure. Data Frame is similar to table, which it is comprised of rows and columns. It also uses row index and column index. ¾ Series: Pandas series is one-dimensional array that is capable of holding various data types such as integer, string, float, object etc. With the help of series () method, we can easily change the list, dictionary into series. A series does not contain multiple columns and rows. Labels of series are called index. ¾ Syntax: pandas.series (data, index, dtype, copy) ¾ Creation of Series: Series can be created in { Creation

of Series from NumPy Arrays.

{ Creation

of Series from Dictionary.

{ Creation

of Series from Scalar Values.

¾ Creation of Series from NumPy Arrays: For creating NumPy Array, as a first step we have to import NumPy library. It creates a 1D array or series. This series allows both the numbers and the letters or strings also as a indices. The length of the array should be same as that of the index value. ¾ Creation of Series from Dictionary: Dictionary is available in the form of (key, value). The index of the series are constructed using the dictionary keys. ¾ Creation of Series from Scalar Values: A series can be

future.

• tail( )

• selection

• Indexing

• slicing

• add( )

• mul( )

• div( )

• pow( )

• head( )

efficient and easy access in the

management of the data for its

is capable of holding various

data type.

structure.

It is defined as the storage and

It is one dimensional array that

Joining

Merging

D

at

columns

Pundas

Numpy

source library for data analysis

• Deletion( )

First Level

Second Level

Trace the Mind Map Third Level

mathematical operations.

performing numerical and

a popular Python library for

Short for Numerical Python, is

mckinney in 2008.

in Python, developed by web

It is high performance open



• Selection( )

• Addition( )

–I das n a

ling using P d n

Data Structure

It is two dimensional data

a f ram e

Boolean Indexing

e Op

so ion t a r

Data H a

• itertuples( )

nd ws a n ro



• iteritems( )



• iterrows( )

DATA HANDLING USING PANDAS-I

11

12 Oswaal CUET (UG) Chapterwise Question Bank created using scalar values. These values can be accessed by using their index values. By default, the index values are assigned from 0 to N-1 (where N- represents the number of values in the series). It also allows the user to add manually the indices to the series based on their choice. ¾ Mathematical Operations: We can perform mathematical operations on series like addition, subtraction, multiplication, division, etc. For this, various methods are used, as follows: { add() : This function is used to add series and others, element-wise (binary operator add). Syntax : Series.add(self, other, level=None, fill_value=None, axis=0) Here, other is series or scalar valuefill_value is None or float value but its default value is None ƒ sub() : This function is used to get subtraction of series and other, element-wise. Syntax : Series.sub(self, other, level=None, fill_value=None, axis=0) { mul() : This function is used to get multiplication of series and others, element-wise. Syntax : Series.mul (other, fillvalue=None, axis=0) { div() : This function is used to get floating division of series and other, element-wise. Syntax : Series.div(self, other, level=None, fill_value=None, axis=0) { pow() : This function is used to get exponential power of series and others, element-wise. Syntax : Series.pow(self, other, level=None, fill_value=None, axis=0) ¾ Head and tail functions: { The head() method in the pandas series is used to retrieve the topmost rows from a series object. By default, it will display 5 rows of series data, and we can customize the number of rows other than 5 rows. { The tail () method in pandas series object is used to retrieve bottom elements from a series. And this tail method takes an integer as a parameter which is represented by variable n.

¾ Selection: { In series, Series.select() function is used for selection. This function returns data corresponding to axis labels matching criteria. We pass the name of the function as an argument to this function which is applied on all the index tables. The index labels satisfying the criteria are selected.



Syntax : Series.select (crit, axis=0)

¾ Indexing: { The object supports both integers and label based indexing and provides a host of methods for performing operation involving the index. { In Python Pandas, Series.index attribute is used to get or set the index labels of the given series object.



Syntax : Series.index

¾ Slicing: { Slicing is a powerful approach to retrieve subsets of data from a Pandas object. A slice object is built using a syntax of start : end : step, the segments representing the first item, last item and the increment between each item that you would like

INFORMATICS PRACTICES

as the step. ¾ Data Frames { Data Frame is a two dimensional data structure i.e., data is aligned in a tabular form as rows and columns. It consists of various properties as iteration, indexing etc. { In data frame, columns can be heterogeneous types like integer, boolean etc. { It can be seen as a dictionary of series where rows and columns both are indexed. { Data Frame can be created using following syntax : { Pandas.DataFrame (data, index, columns, dtype, copy). ¾ Creation of Dataframe: Dataframe can be created in different ways. Some of the major used ways are Scan to know { Creation

of Dataframe from the dictionary of series.

more about this topic

{ Creation of Dataframe from List of dictionaries. { Creation of Dataframe from Text / CSV files.

Creation of Data Frames

¾ Creation of Dataframe from the dictionary of series: The Dataframe has been created from the dictionary of series. Here, the key is the index and the value is the object associated with the key. When Dataframe are created from this series, the resultant set will have the union of all the series index used in the dataframe creation. ¾ Creation of Dataframe from List of Dictionaries: Dataframe has been created from List of Dictionaries. In this creation, key is identified as column and the values are associated with the rows. The dataframe can have as many rows present in the list of dictionary and the columns is equal to the maximum number of keys in the dictionary. It also allows the NULL values to be inserted in the rows. ¾ Creation of Dataframe from Text / CSV values: Text / CSV values has been used for the creation of the Dataframe. Import a text file or CSV file into the code and checks the delimiter such as space or full stop and removes the delimiters. After the removal of the delimiters, the values are converted into a dataframe. The index are the key and the values are the objects read from the text or CSV file. ¾ Iterating in Pandas DataFrame: Iteration is a general term for taking each item of something. We can iterate an element in two ways : (i) Iterating over rows: There are three functions to iterate over rows as follows : ƒ iterrows() : It returns the iterator yielding each index value along with a series containing the data in each row. ƒ iteritems() : It iterates over each column as key, value pair with label as key and column value as series object. ƒ itertuples() : It returns a tuple for each row. The first element of the tuple will be the row’s corresponding index value, while the remaining values are the rows values. (ii) Iterating over columns: In order to iterate over columns, we need to create a list of dataframe columns and then iterate through that list to pull out the dataframe columns.

13

DATA HANDLING USING PANDAS-I

¾ Operations on Rows and Columns: { As we know, DataFrame is a two dimensional data structure means data is arranged in a tabular format like rows and columns, some basic operations can be perform like adding, deleting, selecting and renaming. These operations are as follows: (i) Addition: ƒ To add a column in Pandas Dataframe, a new list as a column can be declared and add to an existing DataFrame. ƒ To add a row in Pandas DataFrame, we can concate the old dataframe with new one. (ii) Selection: ƒ To select a column in Pandas DataFrame, we can either access the columns by calling them by their column names. ƒ To retrieve rows from a DataFrame, a special method is used named DataFrame.loc[]. Rows can also be selected by passing integer location to iloc[] method. (iii) Deletion: ƒ To delete a column from Pandas DataFrame, drop() method is used. Columns are deleted by dropping columns with column names. ƒ To delete a row from Pandas DataFrame, drop() method is used. Rows are deleted by dropping rows by index label. ¾ Rename: Data frame allows the user to change the labels of the rows and the columns. Syntax: dataframe.rename (values, axis). Value is the values associated in the rows or columns and the axis is the index value. The row label which has to be changed their index has to be passed in the function. If explicitly the index is not specified, the default index value will appear in the changed rows or columns. ¾ Head () in Dataframe: head () is a function in dataframe which will return the top most 5 rows of the dataframe.Syntax : head (n); where n is the number of the rows has to be returned from the dataframe. If the number of rows is not mentioned explicitly, then it will return 5 rows from the dataframe by default. ¾ Tail () in Dataframe: tail () is a function in dataframe which will return the last 5 rows of the dataframe. Syntax : tail (n); where n is the number of the rows has to be returned from the bottom. These head () and tail () function were used to obtain a subset of data from the dataframe. ¾ Indexing Using Labels: Dataframe. loc () is a method used to access index values by using their labels. Here the row label is passed as the parameter as an integer value, this integer value is interpreted as an index or key value not as the position of the integer.

¾ Boolean Indexing: { It helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a Boolean index to use the boolean indexing.

¾ In boolean indexing, we can filter a data in four ways : { Accessing { Applying

a DataFrame with a boolean index

a boolean mask to a dataFrame

{ Masking

data based on column value

{ Masking

data based on index value

¾ Joining: While merge() is a module function, .join() is an instance method that lives on your DataFrame. This enables you to specify only one DataFrame, which will join the DataFrame you call .join() on. By default, .join() will attempt to do a left join on indices. If you want to join on columns like you would with merge(), then you’ll need to set the columns as indices. ¾ Merging: When you want to combine data objects based on one or more keys, similar to what you’d do in a relational database, merge() is the tool you need. More specifically, merge() is most useful when you want to combine rows that share data. You can achieve both many-to-one and many-to-many joins with merge(). ¾ Concatenation: You can use pandas. concat() method to concat two DataFrames by rows meaning appending two DataFrames. By default, it performs append operations similar to a union where it bright all rows from both DataFrames to a single DataFrame. ¾ Importing / Exporting Data between CSV Files and Data Frames: ¾ The steps involved in this process were: { Install the libraries needed for creating a connection between the CSV File and the Data Frames. { Open the CSV File in the mode you wish. (Three type of modes are available r-read mode, w- write mode, wr - read and write mode). { Based

on the operation the mode has to be choose.

{ Perform

the operation.

{ Execute

the operation and commit it.

{ The

changes were made in the CSV file.

{ Similarly,

the steps will be reversed for exporting the data from the CSV to the data frame. The difference is that, CSV has to open and to retrieve the data and store it in a data frame and print the data frame.

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. Write the output of the given statement on the basis of given Pandas series; ‘s”. [CUET 2022] a 2 b 4 c 6 d 8 e 10 f 12 print(s[:3])

(A) a b

2 4

(B) a b c d

2 4 6 8

(C) a b c

2 4 6

(D) d e f

8 10 12

2. Which package/software is most suitable to create the CSV file? [CUET 2022]

14 Oswaal CUET (UG) Chapterwise Question Bank (A) Any word processing (B) Any spreadsheet package (C) Any Presentation package (D) Any Database software 3. Consider a dataframe ‘df, which statement(s) is (are) incorrect w.r.t. df operations? [CUET 2022] A. dif’x’][10,20,30], will add a new column’x’ to dataframe df. B. df.loc[‘x’]-[30,40,70], will add a new column’x’ to dataframe df. C. dfl’x’][10,20,30], will add a new row to the dataframe df. D. df loc[x]-[30,40,70], will always add a new row to the dataframe df. E. df.drop(x, axis-0), will delete the row with label ‘x’ from the dataframe df. Choose the correct answer from the options given below: (A) B. C and D only (B) A and E only (C) B and E only (D) C only 4. Ms. Bhavika wants to change the index of the dataframe and the output for the same is given below: [CUET 2022] Name

Stream

Student1

ananya

humanities

student2

bhavya

humanities

(D)

import numpy as np



pencil np.array([10,20,30])



eraser- np.array([40,50,70])



pen= np.array([11,16,17,18])



import pandas as pd



Stationary pd.DataFrame([pencil, pen, eraser], columns=[‘AB’, ‘CD’, ‘EF”,‘GH’]) GH

0

10

20

30

NaN

1

11

16

17

18

2

40

50

70

NaN

AB

CD

EF

0

10

20

30

No value

1

11

16

17

18

2

40

50

70

No value

AB

CD

EF

0

10

20

30

0

1

11

16

17

18

2

40

50

70

0

(B)

(C)

GH

GH

GH

0

10

20

30

-

1

11

16

17

18

2

40

50

70

-

8. ‘a’, ‘b’,’ c’,’ d’, ‘e’. Choose the correct statements to do the same. Assuming that Pandas library is already imported with object alias as pd and numpy as np.  [CUET 2022] (A) pd.Series(np.arange(2,12,2), index = [‘a’, ‘b’,’c’, ‘d’, ‘e’]) (B) pd.Series(np.range(2.12.2), index = [‘a’, ‘b’,’c’.’d’, ‘e’]) (C) pd.Series(np.arange(2,10,2), index = [‘a’, ‘b’,’c’, ‘d’, ‘e’]) (D) pd.Series(pd.arange(2,12,2), index = [‘a’, ‘b’,’c’, ‘d’, ‘e’]) 9. Given a dataframe dl with columns name, stream and Roll no. [CUET 2022] Prabhat wants to print the details of Bhavya’ along with stream. Identify the correct statement. (A) print(d1[[‘name’,[stream’]] [d]1[‘name’]==’Bhavya’]) (B) print(d1[[‘name’, ‘stream’]] [d[‘name’]==Bhavya’) (C) print(d1[[‘name’]==Bhavya’]) (D) print(d1[[‘name’,’stream’] [d1[‘name’]=’Bhavya’]) 10. Match List I with List II List I

[CUET 2022]



EF

EF

7. Which command is used for combining/merging dataframes in pandas? [CUET 2022] (A) pd.combine() (B) pd.merge() (C) pd.join() (D) pd.show()

5. In data science for data analysis, which of the python library are more popular? [CUET 2022] (A) Swift (B) Django (C) Open office (D) Pandas

print(Stationary) (A) AB CD

AB CD



Identify the correct statement to change the index. (A) dl.index[‘student1’, ‘student2”] (B) d1.index=[‘student1’, ‘student2”] (C) d1.index [‘student1”, “student2”] (D) dl.index = [‘student1’, ‘student2”]

6. Find the output for following:

INFORMATICS PRACTICES

[CUET 2022] List II

A. DataFrame. shape

I.

To display names of columns

B. DataFrame.T

II.

To display the labels

C. DataFrame. index.

III. To display dimensions of data. dataframe

D. DataFrame. columns

IV.

To interchange columns and rows

Choose the correct answer from the options given below: (A) A-III ,B-II ,C-I ,D-IV (B) A-IV ,B-I ,C-II ,D-III (C) A-III ,B-IV ,C-II ,D-I (D) A-II ,B-I ,C-III ,D-IV 11. Which Python library is not used for data science? (A) Pandas (B) Numpy (C) Matplotlib (D) Tkinter 12. Given a Pandas series called sequences, the command which will display the first 4 rows is __________. (A) print (sequences.head(4)) (B) print (sequences.Head(4)) (C) print (sequences.heads(4)) (D) print (sequences.Heads(4)) 13. The command to install the Pandas is: (A) Install pip pandas (B) Install pandas (C) pip pandas (D) pip install pandas 14. What will be the output of the given code?

import pandas as pd



s = pd.Series([1,2,3,4,5],index=[‘akram’,’brijesh’,’charu’,’deepika’,’era’])

15

DATA HANDLING USING PANDAS-I

print(s[‘charu’]) (A) 1 (B) 2 (C) 3 (D) 4 15. Consider the following series named animal:

L Lion



B Bear



E Elephant



T Tiger



W Wolf



dtype: Object



Write the output of the command:

print(animal[::-3]) (A) L Lion T Tiger dtype: object

(B) B Bear E Elephant dtype: object

(C) W Wolf B Bear dtype: object

(D) W Wolf T Tiger dtype: object

16. A social science teacher wants to use a pandas series to teach about Indian historical monuments and their states. The series should have the monument names as values and state names as indexes which are stored in the given lists, as shown in the code. Choose the statement which will create the series:

import pandas as pd



Monument=[‘Qutub Minar’,’Gateway of India’, ’Red Fort’,’Taj Mahal’] State=[‘Delhi’,’Maharashtra’,’Delhi’,’Uttar Pradesh’] (A) S=df.Series(Monument,index=State) (B) S=pd.Series(State,Monument) (C) S=pd.Series(Monument,index=State) (D) S=pd.series(Monument,index=State) 17. Which of the following statement is wrong? (A) Can’t change the index of the Series. (B) We can easily convert the list, tuple, and dictionary into a series. (C) A Series represents a single column in memory. (D) We can create empty Series 18. What type of error is returned by the following statement?

import pandas as pa pa.Series ([1, 2, 3, 4], index = [‘a’, ‘b’, ‘c’]) (A) Value Error (B) Syntax Error (C) Name Error (D) Logical Error 19. Consider the following Series in Python:

(B) Both (A) and (R) are true and R is not the correct explanation (A) (C) (A) is True but (R) is False (D) (A) is false but (R) is True 1. Assertion (A): add() function is used to add series and others, element wise.

2. Assertion (A): tail() function returns last n rows from the object based on position.

20. To display third element of a Series object S, you will write: (A) S[:3] (B) S[2] (C) S[3] (D) S[:2]

(B) ASSERTION REASON QUESTIONS Directions: Given below is questions based on Assertion and Reason. Mark the correct choice as (A) Both (A) and (R) are true and (R) is the correct explanation (A)

Reason (R): n is the selected number of rows whose default value is 6.

3. Assertion (A): You need to import or load the Pandas library first in order to use it.

Reason (R): The “pd” is an alias or abbreviation which will be used as a shortcut to access or call pandas functions.

4. Assertion (A): Matplotlib is a visualization library in Python that used for 2D plots of arrays.

Reason (R): Indexing function is used to get or set the index labels of the given series object.

5. Assertion (A): To create a series from array, we have to import the NumPy module and then use array () method.

Reason (R): NumPy is an open-source numerical Python library. NumPy contains a multi-dimensional array and matrix data structures.

6. Assertion (A): A dict can be passed as an input to the Series. Reason (R): If index is passed, then corresponding values to a particular label in the index will be extracted from the dictionary. 7. Assertion (A): In series, Series.selection() function is used for selection. Reason (R): tail() function returns last n rows from the object based on position. It is useful for quickly verifying data. 8. Assertion (A): In Python Pandas, Series.index attribute is used to get or set the index labels of the given series object.

data = pd.Series([5, 2, 3, 7], index = [‘a’, ‘b’, ‘c’, ‘d’])

Which Statement will display all odd values? (A) print(data%2==0) (B) print(data(data%2!=0)) (C) print(data mod 2!=0) (D) print(data[data%2!=0])

Reason (R): Parameter of add(), fill_value has default value None.

Reason (R): ix[] attribute is used to access a group of rows and columns by label (s) or a boolean array in the given series object.

9. Assertion (A): Pandas is an open source Python library which offers high performance, easy-to-use data structures and data analysis tools.

Reason (R): Professionals and developers are using the pandas library in data science and machine learning.

10. Assertion (A): Some time we want to combine the two dataframes using the merge() function Reason (R): Merging operation can be performed only with common values of column not with specific column.

16 Oswaal CUET (UG) Chapterwise Question Bank

INFORMATICS PRACTICES

[C] CASE BASED QUESTIONS



‘Rehana’: p(D)Series([92, 81, 96],

I. Read the following text and answer the questions that follow: (Q1-Q5)



index=[‘Maths’,’Science’,’Hindi’]),



‘John’: p(D)Series([89, 91, 88],



index=[‘Maths’,’Science’,’Hindi’]),



‘Roja’: p(D)Series([81, 71, 67],



index=[‘Maths’,’Science’,’Hindi’]),



‘Mannat’: p(D)Series([94, 95, 99],



index=[‘Maths’,’Science’,’Hindi’])} DF = p(D)DataFrame(ResultSheet)



Consider the following DataFrame df and answer any four questions Fruits Pulses

Rice

Wheat

Andhra p.

7830

931.0

7452.4

NaN

Gujarat

11950

818.0

1930.0

2737.0

Kerala

113.1

1.7

2604.8

NaN

Punjab

7152

33.

11586.2

16440.5



Tripura

44.1

23.2

814.6

0.5

print(DF)

Uttar p.

140169.2 2184.4 13754.0

30056.0

Output of the above code:

1. Write down the command to find minimum value along the columns for each row. (A) df.min()

(B) df.min(axis=1)

(C) df.min(axis=0)

(D) df.min(column)

2. Which argument is used with max() function for only numeric values are used for calculation. (A) NaN=True (B) numerionly=True (C) skipna=True,numeric_value=True (D) skipNaN=True,number_value=True 3. Select command to delete column wheat. (A) del df[‘wheat’]

(B) del ‘wheat’

(C) del df.wheat

(D) del df[4]

Maths

Naveen

Rahana

John

Roja Mannat

90

92

89

81

94

Science 91

81

91

71

95

Hindi

96

88

67

99

97

Based on the given information, answer the questions: 1. He wants to add a new column with name of student ‘Prem’ in above data frame choose the right command to do so: (A) DF[‘Prem’]=[89,78,76] (B) df[‘Prem’]=[89,78,76] (C) DF[‘Prem’]=[89,78,76,67] (D) DF[‘Name’]=[89,78,76] 2. He wants to set all the values to zero in data frame, choose the right command to do so:

4. Which function is used to change the name of index.

(A) DF=0

(B) DF[]=0

(A) df.change(index={“Andhra p.”:”A”,”Gujarat”:”B”, ”Kerala”:”C”, ”Punjab”:”D”})

(C) DF[:]=0

(D) DF[:]==0

(B) df.reindex(index={“Andhra p.”:”A”,”Gujarat”:”B”, ”Kerala”:”C”,”Punjab”:”D”})

(A) DF.drop(‘Science’, axis=1)

(C) df.named(index={“Andhra p.”:”A”,”Gujarat”:”B”, ”Kerala”:”C”, ”Punjab”:”D”}) (D) df.rename(index={“Andhra p.”:”A”,”Gujarat”:”B”, ”Kerala”:”C”,”Punjab”:”D”}) 5. Select code which will change value of ‘7152’ Fruits column of row Punjab into 9658.

3. He wants to delete the row of science marks: (B) DF.drop(‘Science’, axis=0) (C) DF.drop(‘Science’, axis=-1) (D) DF.drop(‘Science’, axis==0) 4. The following code is to create another data frame, which he wants to add to the existing Dataframe. Choose the right command to do so:

(A) df.Fruits(7152)=9658



Sheet1={ ‘Aaradhya’: p(D)Series([90, 91, 97],

(B) df.punjab[7152]=9658



index=[‘Maths’,’Science’,’Hindi’])}

(C) df.Fruits[‘punjab’]=9658



S1=p(D)DataFrame(Sheet1)

(D) df.punjab[‘Fruits’](7152)=9658 II. Read the following text and answer the questions that follow: (Q6-Q10)

Mr. Sharma is working with an IT company, and he has provided some data. On which he wants to do some operations, but he is facing some problem, help him:

(A) DF.append(S1,axis=0)

(B) DF.append(S1)

(C) DF.insert(S1)

(D) DF.join(S1)

5. Will be the output of the given command? Naveen

Rahana

John

Maths

90

92

89

81

94

Code:

Science

91

81

91

71

95



import pandas as pd

Hindi

97

96

88

67

99



ResultSheet={ ‘Naveen’: p(D)Series([90, 91, 97],



index=[‘Maths’,’Science’,’Hindi’]),



Roja Mannat

print(DF.size)

(A) 15

(B) 18

(C) 21

(D) 23

17

DATA HANDLING USING PANDAS-I

ANSWER KEY [A] MULTIPLE CHOICE QUESTIONS 1. (C)

2. (B)

3. (A)

4. (A)

5. (D)

6. (A)

7. (B)

8. (A)

9. (B)

10. (C)

11. (D)

12. (A)

13. (D)

14. (C)

15. (C)

16. (C)

17. (A)

18. (A)

19. (D)

20. (B)

8. (C)

9. (A)

10. (C)

8. (A)

9. (D)

10. (C)

[B] ASSERTION REASON QUESTIONS 1. (A)

2. (C)

3. (B)

4. (B)

5. (A)

6. (B)

7. (D)

[C] CASE BASED QUESTIONS 1. (B)

2. (C)

3. (A)

4. (D)

5. (C)

6. (B)

7. (C)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS 1. Option (C) is correct. Explanation: Retrieve the first three elements in the Series. If a : is inserted in front of it, all items from that index onwards will be extracted. If two parameters (with : between them) is used, items between the two indexes (not including the stop index). 2. Option (B) is correct. Explanation: Using a spreadsheet application like Excel, Google Sheets, or OpenOffice Calc is the easiest way to make CSV files. If you can’t use any of those programs, you can use a text editor like Notepad or TextEdit. 3. Option (A) is correct. Explanation: statement B, C and D are incorrect with respect to given dataframe df operations. 4. Option (A) is correct. Explanation: Indexing in pandas means simply selecting particular rows and columns of data from a DataFrame. Indexing could mean selecting all the rows and some of the columns, some of the rows and all of the columns, or some of each of the rows and columns. 5. Option (D) is correct. Explanation: In data science for data analysis, Pandas of python library are more popular. It is primarily used for data analysis, data manipulation, and data cleaning. Pandas allow for simple data modeling and data analysis operations without needing to write a lot of code. 6. Option (A) is correct. Explanation: from the given option, option (a) has right output for the given code. 7. Option (B) is correct.

Explanation: arange() with pandas Series. There are three types of arguments that can be passed all together or some of them alone like (stop), (start, stop), (start, stop, step). If we pass an integer argument, this method works similar to the range function. 9. Option (B) is correct. 10. Option (C) is correct. Explanation: shape attribute displays the dimensions of dataframe, T attribute interchange columns and rows, index attribute displays the labels and columns attribute displays the name of columns. 11. Option (D) is correct. Explanation: Tkinter is used to create GUI applications with Python. 12. Option (A) is correct. Explanation: Pandas head() method is used to return top n (5 by default) rows of a data frame or series 13. Option (D) is correct. Explanation: pip command is used to install any libraries in Python. 14. Option (C) is correct. Explanation: We will get the output as 3 because ‘charu’ is the index name given to 3rd row. s[‘charu’] will represent the element which is present in the third index that is 3. 15. Option (C) is correct. Explanation: Option C will be the correct answer because the slicing [::-3] represents all the elements from last index to first index with the gap of 3 in reversed order. 16. Option (C) is correct. Explanation: The Series() function creates a series. The index and values can be specified as lists.

Explanation: pd.merge() command is used for combining/ merging dataframes in pandas. The joining is performed on columns or indexes. If the joining is done on columns, indexes are ignored. This function returns a new DataFrame and the source DataFrame objects are unchanged.

17. Option (A) is correct.

8. Option (A) is correct.

19. Option (D) is correct.

Explanation: Index of a Series can be changed using reset_index() 18. Option (A) is correct. Explanation: Length of passed value and index do not match.

18 Oswaal CUET (UG) Chapterwise Question Bank

INFORMATICS PRACTICES

20. Option (B) is correct.

8. Option (C) is correct.

Explanation: S[2] will return the element present at 2 index i.e. third element of a series.

Explanation: .loc[] attribute is used to access a group of rows and columns by label (s) or a boolean array in the given series object. .ix[] attribute is primarily label location based indexer, with integer position fallback. It takes the label as input and returns the value corresponding to that label.

[B] ASSERTION REASON QUESTIONS 1. Option (A) is correct. Explanation: add() function is used to add series and others, element wise. Syntax Series.add (other, fill_value=None, axis=0) Here, other is series or scalar value. Fill_value is None or float value but its default value is None 2. Option (C) is correct. Explanation: tail() function returns last n rows from the object based on position. It is useful for quickly verifying data. for example, after sorting

9. Option (A) is correct. 10. Option (C) is correct. Explanation: The merge() operation is a method used to combine two dataframes based on one or more common columns, also called keys.

[C] CASE BASED QUESTIONS 1. Option (B) is correct.

Series.tail(n = 5)

Explanation: If the input is a dataframe, then the method will return a series with a minimum of values over the specified axis in the dataframe. By default, the axis is the index axis. 1) Get minimum values of every column : Use min() function to find the minimum value over the index axis.

Here, n is the selected number of rows whose default value is 5.

2. Option (C) is correct.

3. Option (B) is correct.

Explanation: skipna: It excludes all the null values when computing result. level: It counts along with a particular level and collapsing into a Series if the axis is a MultiIndex (hierarchical), numeric_only: It includes only int, float, boolean columns. If None, it will attempt to use everything, then use only numeric data.

Syntax

Explanation: By “Importing a library”, it means loading it into the memory and then you can use it. Run the following code to import pandas library: import pandas as pd 4. Option (B) is correct. Explanation: Matplotlib is a multi-platform data visualization library which build NumPy arrays. Matplotlib produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, thePython and IPython shell, web application servers and various graphical user interface toolkits. 5. Option (A) is correct. Explanation: Numpy is a library that contains multidimensional array objects as well as functions for manipulating those array. 6. Option (B) is correct. Explanation: A dict can be passed as an input. If there is no index specified, then the dictionary’s keys are taken in a sorted order. If index is passed, then corresponding values to a particular label in the index will be extracted from the dictionary. 7. Option (D) is correct. Explanation: In series, Series.select() function is used for selection. This function returns data corresponding to axis labels matching criteria. We pass the name of the function as an argument to this function which is applied on all the index tables. Pandas tail() method is used to return bottom n (5 by default) rows of a data frame or series. Syntax: Dataframe.tail(n=5).

3. Option (A) is correct. Explanation: drop operates on both columns and rows; del operates on column only. drop can operate on multiple items at a time; del operates only on one at a time. drop can operate in-place or return a copy; del is an in-place operation only. 4. Option (D) is correct. Explanation: rename() method in Python is used to rename a file or directory. This method renames a source file/ directory to specified destination file/directory. Parameters: source: A path-like object representing the file system path. 5. Option (C) is correct. Explanation: df.Fruits[‘punjab’]=9658 will change value of ‘7152’ Fruits column of row Punjab into 9658 6. Option (A) is correct. Explanation: To add a new column in a data frame, syntax is dataframe [‘colname’] = values. Here the data frame variable is DF. Hence, DF [‘Prem’] = [89,78,76]. 7. Option (C) is correct. 8. Option (B) is correct. Explanation: To delete the row in a data frame, drop () has to be used. The axis value is set to be 0 by default. drop() delete the specified row or column name either by the name or index value.

19

DATA HANDLING USING PANDAS-I

9. Option (B) is correct.

10. Option (A) is correct.

Explanation: append () is a function which merges the new sheet with the existing dataframe.

Explanation: size returns the number of values stored in a dataframe.

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

3

  Revision Notes:

DATA HANDLING USING PANDAS II Scan to know more about this topic

¾ A large number of methods collectively compute descriptive statistics and other related operations on DataFrame. Most of these are aggregations like sum(), mean() etc. ¾ sum(): Returns the sum of the values Descriptive statistics in for the requested axis. By default, axis Pandas is index (axis=0). Syntax for using sum() function is : DataFrame. sum(axis=0, skipna=True, numeric_only=False) ¾ mean() : Returns the average value from a set of numerical values in a column of a dataframe. Syntax for using mean() function is : DataFrame. mean(axis=None, skipna=None, numeric_only=None) ¾ std() : Returns the standard deviation of the numerical columns. The standard deviation is normalized by N-1 by default and can be changed using the ddof argument. Syntax for using std() function is : Series.std(axis=None, skipna=None, level=None, ddof=1, numeric_only=None) ¾ count() : Returns the Number of non-null observations from a dataset. Syntax for using count() function is : DataFrame. count(axis=0, numeric_only=False) ¾ median() : Returns the Median of Values from a numerical column. ¾ mode() : Returns the Mode from a set of values from a pandas data structure. The mode is defined as the value that appears the most number of times in a data. Syntax for using mode() function is : DataFrame. mode(axis=0, numeric_only=False) ¾ min() : Returns the Minimum Value from a set of values from a pandas data structure. Syntax for using min() function is : DataFrame. min(axis=None, skipna=None, numeric_only=None) ¾ max() : Returns the Maximum Value from a set of values from a pandas data structure. Syntax for using max() function is : DataFrame. max(axis=0, skipna=True, numeric_only=False) ¾ quantile() : The quantile() method calculates the quantile of the values in a given axis. Default axis is row. The divided parts are called quantiles, which means median divides a distribution in 2 quantiles. Syntax for using quantile() function is : . quantile(q=0.5, axis=0, numeric_only=True)

¾ Variance: var() : DataFrame.var() is used to display the variance. It is the average of squared difference from the mean i.e. square of standard deviation. Syntax for using var() function is : DataFrame. var(axis=None, numeric_only=None) ¾ Data Aggregations() : It is the process of producing a summary statistics from a dataset using a statistical Scan to know aggregation function. Aggregation more about means to transfer the dataset and this topic produce a single numeric value from an array. The aggregate() method allows you to apply a function or a list of function names to be executed Pandas along one of the axis of the DataFrame, DataFrames: Aggregation default 0, which is the index (row) axis. Note: the agg() method is an alias of the aggregate() method. Example: df.aggregate({“Number”:[‘sum’, ‘min’], “Age”:[‘max’, ‘min’], “Weight”:[‘min’, ‘sum’], “Salary”:[‘sum’]}) ¾ Pandas Groupby is used for grouping the data according to the categories and applying a function to the categories. It also helps to aggregate data efficiently. The Pandas groupby() is a very powerful function with a lot of variations. It makes the task of splitting the Dataframe over some criteria really easy and efficient.

Syntax of the groupby() function is: DataFrame. groupby(by=None, axis=0) ¾ Parameters: by: a label to be used for grouping. axis: spilt along rows(0) or columns(1) ¾ Sorting a DataFrame: Sorting refers to the arrangement of data elements in a specified order, which can either be ascending or descending. Pandas provides two methods to sort data of a dataframe. * sort_values() *sort_index() In order to sort the data frame in pandas, the function sort_ values() is used. Pandas sort_values() can sort the data frame in Ascending or Descending order. Syntax of the function is : DataFrame.sort_values(by, axis=0, ascending=false)

First Level

Median

Third Level

Filling

a

Pivoting

Deleting Index

Group by

Sorting

Importing/Exporting data between MySQL Database and Pandas

Renaming Index

Dataframe Operations

Aggregation

ndling—Pan a h d

Descriptive Statistics sun

Handling missing values

Count

Second Level



Trace the Mind Map

Dropping

Variance

Standard Deviation



Mode

Da t

Mean



Max

DATA HANDLING USING PANDAS II

21

II as

22 Oswaal CUET (UG) Chapterwise Question Bank Example : df.sort_values(by=[‘Population’], ascending=False) df.sort_values(by=[‘Country’]) Pandas provide sort_index() function to sort the data values on the basis of row of a DataFrame. Syntax of the function is : DataFrame.sort_ index(ascending=True) ¾ Renaming index : Using df.columns and df.index The pandas rename function is used to change a single column. Example : import pandas as pd df = pd.DataFrame({‘a’: [1, 2], ‘b’: [3, 4]}) su = df.rename(columns={df.columns[1]: ‘new’}) ¾ Deleting index : We can drop the index columns by using reset_index() method. It will remove the index values and set the default values from 0 to n values Syntax: dataframe.reset_index(drop=True, inplace=True) ¾ Pivoting in pandas : The pivot function is used to reshape and create a new DataFrame from the original one. Pandas. pivot(index, columns, values) function produces pivot table based on 3 columns of the DataFrame. Uses unique values from index / columns and fills with values. Syntax of the pivot() function is : DataFrame. pivot(index=column name, columns=column name, values=column name) Parameters: index: column name that will be acting as an index. columns: the new column for the pivoted data. values: columns whose values will be displayed. Example : import pandas as pd df = pd.DataFrame({‘A’: [‘John’, ‘Boby’, ‘Mina’], ‘B’: [‘Masters’, ‘Graduate’, ‘Graduate’], ‘C’: [27, 23, 21]}) df.pivot(‘A’, ‘B’, ‘C’) When we have a duplicate values in index, in that case statement result shows an error: Because of this duplicate data can not be reshaped using pivot function. Hence, before calling the pivot() function, we should ensure that data do not have any type of duplicate values from any specified column. If we cannot ensue this, we can use pivot_table() function. pivot_table() function works like a pivot() function, but aggregates the values from rows with duplicates values for the specified columns. Syntax of the function is: pandas.pivot_table(data, values=None, index=None, columns=None, aggfunc=’mean’) Parameter: aggfunc can have values among sum, max, min etc. ¾ Handling Missing Values: Missing Data can occur when no information is provided for one or more items or for a whole unit. Missing Data can also be referred to as NA(Not

INFORMATICS PRACTICES

Available) values in pandas.

In Pandas missing data is represented by two values: ƒ None: None is a Python singleton object that is often used for missing data in Python code. ƒ NaN : NaN (an acronym for Not a Number)



Functions for missing values: ƒ isnull() ƒ notnull() ƒ dropna() ƒ fillna() ƒ replace()

¾ Checking for missing values using isnull() : In order to check null values in Pandas DataFrame, we use isnull() function. This function returns a dataframe of Boolean values which are True for NaN values.

Scan to know more about this topic

Handling missing values in Python DataFrame

¾ Checking for missing values using notnull() : In order to check null values in Pandas Dataframe, we use notnull() function. This function returns a dataframe of Boolean values which are False for NaN values. ¾ Filling missing values using fillna() and replace() : In order to fill null values in datasets, we use fillna() and replace() function. These functions replace NaN values with some value of their own. ¾ Dropping missing values using dropna() : In order to drop a null value from a dataframe, we use dropna() function. This function drops Rows/Columns of datasets with Null values in different ways. ¾ Importing Data from MySQL to Pandas : Importing data from MySQL to pandas basically Scan to know refers to the process of reading a table more about this topic from MySQL database and loading it to a pandas DataFrame. After establishing the connection, in order to fetch data from the table of the database we have Importing the following three functions (i) pandas.read_sql_query(query,sql_ conn) : It is used to read an sql query (query) into a DataFrame using the connection identifier(sql_conn) returned from the create_engine().

and exporting data between Pandas and MySQL database

(ii) pandas.read_sql_table(table_name,sql_conn) : It is used to read an sql table (table_name) into a DataFrame using the connection identifier (sql_conn). (iii) pandas.read_sql(sql, sql_conn) It is used to read either an sql query or an sql table (sql) into a DataFrame using the connection identifier (sql_conn). ¾ Exporting Data from Pandas to MySQL : Exporting data from Pandas to MySQL basically refers to the process of writing a pandas DataFrame to a table of MySQL database.

For this purpose, we have the following function: pandas. DataFrame.to_sql(table,sql_conn,if_exists=”fail”, index=False/True)

23

DATA HANDLING USING PANDAS II

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS

1. In pandas which method is used to calculate mean , median and other summary statistics for numerical data in columns? (A) sort_values() (B) melt () (C) describe () (C) pivot_table () 2. Which of the following method calculates the quantile of the values in a given axis? (A) quan () (B) quantile() (C) qu () (D) q () 3. What is the primary function of pivot_table() function? (A) Group data (B) Sort data (C) Reshape data (D) Aggregate data 4. In Python the method used to fill missing values in a dataframe with specified values or filling method is : (A) melt() (B) drop_duplicates() (C) dropna() (D) fillna() 5. In Pandas missing data is represented by: (A) None (B) NaN (C) Both (A) and (B) (D) Fillna 6. In Python the method used to calculate the mode of numerical column in a dataframe is : (A) sum() (B) mode() (C) median() (D) average() 7. What is the primary purpose of groupby method when working with categorical data in pandas? (A) Sorting data (B) Filtering data (C) Reshaping data (D) Grouping and aggregating data 8. The method which provides the total of numerical values in a column in a dataframe is : (A) total() (B) describe() (C) sum() (D) None of these 9. Which of the following returns the Mode from a set of values from a pandas data structure? (A) mode() (B) min() (C) median() (D) mean() 10. Which of the following is not a function for descriptive statistics in pandas? (A) med() (B) variance() (C) std() (D) agg() 11. The____________ method is used to calculate variance of values in a numerical column of a dataframe. (A) mean() (B) sum() (C) var() (D) median() 12. The__________________parameter is used to specify the column on which to sort the data of a dataframe. (A) order (B) by (C) column (D) field 13. Which method is used to change the labels of rows and columns in DataFrame? (A) change () (B) rename () (C) replace () (D) None

14. Which of the following functions are used in pivoting? (A) pivot() (B) pivot_table() (C) Both (A) and (B) (D) pivot_data() 15. Which function in the pandas library is used to execute a SQL query and return the query’s results? (A) read_sql() (B) read_table() (C) read_data() (D) None of these 16. ________________method can be used to store data of a dataframe to a SQL database. (A) write_sql() (B) to_sql() (C) store_data() (D) Both (A) and (B) 17. The statement to install the Python connector to connect MySQL is : (A) pip install mysql (B) pip install pymysql (C) pip install mysql-connector-python (D) Both (B) and (C) 18. The__________statement is often used with aggregate functions COUNT() , MAX() ,MIN() ,SUM() ,AVG() to group the result-set by one or more columns. (A) groupby (B) GROUP DATA (C) DESCRIBE (D) None of these 19. The function used to remove an index in a pandas dataframe is : (A) drop_index() (B) reset_index() (C) change_index() (D) Both (A) and (B) 20. The default axis for quantile() function is : (A) row (B) column (C) heading (D) None of these (B) ASSERTION REASON QUESTIONS Directions: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. (A) Both A and R are true and R is the correct explanation for A. (B) Both A and R are true and R is not the correct explanation for A. (C) A is true but R is false. (D) A is false but R is true. 1. Assertion (A): The sort_index() function arranges the data in a column of a dataframe. Reason (R): : The sort_values() function takes a “by” parameter that specifies the column on which to sort. 2. Assertion (A): The reset_index() can be used to reset the index to the previous index. Reason (R): Python pandas allows to change the default index to another column of the dataframe, which can be reset using the reset_index() function. 3. Assertion (A):Descriptive statistics in pandas means getting aggregate values from numeric columns. Reason (R): mean() and median() functions belong to category of descriptive statistics functions.

24 Oswaal CUET (UG) Chapterwise Question Bank 4. Assertion (A):Group operation returns an aggregate result from a column of a data frame. Reason (R): groupby() function groups data in pandas. 5. Assertion (A): The rename_col() function can be used to rename columns in pandas. Reason (R): The pandas rename() function is used to change a single column. 6. Assertion (A): mysql-connector-python needs to be installed for performing data exchange between python pandas and mysql database. Reason (R): It is the package that comprises of functions for performing the connectivity and exchange operations. 7. Assertion (A): Importing Data from MySQL to Pandas means bringing data from mysql database to pandas dataframe. Reason (R): Data can be imported using the read_sql() function. 8. Assertion (A): In order to fill null values in a datasets, we use fillna() and replace() function. Reason (R): These functions replace NaN values with some value of their own. All these functions help in filling a null values in datasets of a DataFrame 9. Assertion (A): The isnull() function can be used to check for null values in pandas datasets. Reason (R): The isnull() function returns a dataframe of Boolean values which are True for NaN values. 10. Assertion (A): In order to drop a null value from a dataframe, dropna() function can be used. Reason (R): This function drops Rows/Columns of datasets with Null values in different ways.

[C] CASE BASED QUESTIONS I. Read the following text and answer the questions that follow: (Q1-Q5) Rahul is working on a dataframe storing the data of some customer relation executives. The dataframe is created as follows : import pandas as pd import numpy as np #Create a Dictionary of series



d = {‘Name:pd.Series([‘Tom’,’James’,’Ric ky’,’Vin’,’Steve’,’Smith’,’Jack’,’Lee’, ’David’,’Gasper’,’Betina’,’Andres’]),

‘Age’:pd.Series ([25,26,25,23,30,29,23,3 4,40,30,51,46]), ‘Rating’:pd.Series ([4.23,3.24,3.98,2.56, 3.20,4.6,3.8,3.78,2.98,4.80,4.10,3.65])} #Create a DataFrame df = pd.DataFrame(d) The statement print(df) shows the following:

Name

Age Rating

0.

Tom

25

4.23

Ricky

25

3.98

1.

James

3.

Vin

2. 4.

Steve

6.

Jack

5.

Smith

7. 8. 9.

10.

INFORMATICS PRACTICES

Lee

David

Gasper Betina

26 23 30 29 23 34 40 30 51

3.24 2.56 3.20 4.60 3.80 3.78 2.98 4.80 4.10

11. Andres 46 3.65 Select correct options for the following with respect to the above data. 1. Which function will he use to get the following output ? Age 382 Name TomJamesRickyVinSteveSmithJackLee Rating 44.92 dtype: object (A) median() (B) sum() (C) total() (D) mode() 2. Which function will he use to get the following output? Age 31.833333 Rating 3.743333 dtype: float64 (A) mean() (B) sum() (c) mode() (d) std() 3. Which function has to be used to get the number of non null observations in the dataset? (A) var() (B) pivot() (C) count() (D) read() 4. The function to be used to get the maximum age from the values is_________ (A) get_mul() (B) max() (C) maximum() (D) product() 5. The function that would produce the following output is : count mean std min 25% 50% 75%

Age

Rating

31.833333

3.743333

12.000000 9.232682

23.000000 25.000000 29.500000 35.500000

max 51.000000 (A) all() (C) median()

12.000000 0.661628 2.560000 3.230000 3.790000 4.132500

4.800000 (B) describe() (D) None of these

II. Read the following text and answer questions that follow: (Q6-Q10)

Ronita is working in a pandas dataframe where she has stored data of some cars of a showroom. Now she wants to exchange data between the dataframe and a Mysql tabe. Help her in the following queries : (The structure and data of the dataset is as given below)

25

DATA HANDLING USING PANDAS II

0 1 2 3 4 5 6

CarId

CarName

Price

Model

YearManufacture

Fueltype

D002

Car1

673112.00

VXI

2018

Petrol

D001 B001 B002 E001 E002 S001

Car1 Car2

582613.00 567031.00

Car2

647858.00

Car3

355205.00

Car3

654914.00

Car4

514000.00

LXI

2017

Sigma1.2 Delta1.2 5STR STD CARE LXI

7 S002 Car4 614000.00 VXI 6. The function she has to use to transfer the data to a MySQL table is : (A) write_sql() (B) to_sql() (C) read_sql() (D) save_sql(0 7. To perform the exchange operations she has to write which of the following statement before beginning the process? (A) import pandas as pd (B) pip install pymysql (C) pip install mysql-connector-python (D) Either of (B) or (C)

2019

Petrol Petrol

2018

Petrol

2017

CNG

2018

CNG

2017

Petrol

2018 Petrol 8. To use the read_sql_table() function she needs to specify which parameters from the following : (A) table name (B) sql connection (C) sql query (D) Both (A) and (B) 9. The read_sql_query() function requires _________ and __________as inputs to read data from sql table to a dataframe. (A) SQL query (B) SQL query and Engine (C) Engine and table name (D) None of these 10. Which among the following need not be specified while creating the engine? (A) Username (B) Password (C) Database Name (D) All need to be specified.

ANSWER KEY [A] MULTIPLE CHOICE QUESTIONS 1. (C)

2. (B)

3. (A)

4. (D)

5. (C)

6. (B)

7. (D)

8. (C)

9. (A)

10. (A)

11. (C)

12. (B)

13. (B)

14. (C)

15. (A)

16. (B)

17. (D)

18. (A)

19. (B)

20. (A)

8. (A)

9. (A)

10. (A)

8. (D)

9. (B)

10. (D)

[B] ASSERTION REASON QUESTIONS 1. (D)

2. (A)

3. (A)

4. (D)

5. (D)

6. (A)

7. (B)

[C] CASE BASED QUESTIONS 1. (B)

2. (A)

3. (C)

4. (B)

5. (B)

6. (B)

7. (D)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS

1. Option (C) is correct. Explanation: The describe() function shows the summary statistics for numerical columns in datasets. 2. Option (B) is correct. Explanation: The quantile() method calculates the quantile of the values in a given axis. Default axis is row. 3. Option (A) is correct. Explanation: The pivot table takes simple column-wise data as input, and groups the entries into a two-dimensional table that provides a multidimensional summarization of the data. 4. Option (D) is correct. Explanation: The fillna() method is used to fill missing and NaN values in a dataframe. 5. Option (C) is correct. Explanation: In Pandas missing data is represented by two values:

None: None is a Python singleton object that is often used for missing data in Python code. 6. Option (B) is correct. Explanation: mode() function calculates the element with the highest frequency in a set of values. 7. Option (D) is correct. Explanation: Pandas Groupby is used for grouping the data according to the categories and applying a function to the categories. It also helps to aggregate data efficiently. 8. Option (C) is correct. Explanation: The method which provides the total of numerical values in a column in a dataframe is sum(). It returns the sum of the values for the requested axis. By default, axis is index (axis=0). 9. Option (A) is correct. Explanation: mode() function returns the Mode from a set of values from a pandas data structure.

26 Oswaal CUET (UG) Chapterwise Question Bank 10. Option (A) is correct. Explanation: med() function does not exist in pandas library. 11. Option (C) is correct. Explanation: The statistics. variance() method calculates the variance from a sample of data (from a population). A large variance indicates that the data is spread out, a small variance indicates that the data is clustered closely around the mean. 12. Option (B) is correct. Explanation: The “by” parameter specifies the column on which to sort the data in a dataframe. 13. Option (B) is correct. Explanation: You can use the rename() method of pandas. DataFrame to change column/index name individually. Specify the original name and the new name in dict like {original name: new name} to columns / index parameter of rename() 14. Option (C) is correct. Explanation: The pivot() and pivot_table() functions are used in pivoting data in pandas. 15. Option (A) is correct. Explanation: pandas read_sql() function is used to read SQL query or database table into DataFrame. 16. Option (B) is correct. Explanation: The Pandas method to_sql is used to send data from a DataFrame to a SQL database. 17. Option (D) is correct. Explanation: The statement to install the python connector to connect MySQL are pip install pymysql and pip install mysql-connector-python. 18. Option (A) is correct. Explanation: A groupby statement is often used with aggregate functions COUNT() , MAX() ,MIN() ,SUM() ,AVG() to group the result-set by one or more columns.It involves some combination of splitting the object, applying a function, and combining the results. This can be used to group large amounts of data and compute operations on these groups. 19. Option (B) is correct. Explanation: The reset_index() method allows you to reset the index back to the default 0, 1, 2 etc indexes. By default, this method will keep the “old” indexes 20. Option (A) is correct. Explanation: The quantile() method calculates the quantile of the values in a given axis. Default axis is row.

[B] ASSERTION REASON QUESTIONS 1. Option (D) is correct. Explanation: The sort_index() function sorts indexes in a dataframe. The sort_values() function arranges data according to a column of a pandas dataframe. 2. Option (A) is correct. Explanation: A dataframe is created with a default index or an index specified by the user. This index can be set or reset to other columns of the dataframe. 3. Option (A) is correct.

INFORMATICS PRACTICES

Explanation: mean() function returns the average of values , the median function returns the middle value in a set. 4. Option (D) is correct. Explanation: Pandas Groupby is used for grouping the data according to the categories and applying a function to the categories. 5. Option (D) is correct. Explanation: To rename a single column in a dataframe the rename() function can be used as df.rename(columns={df. columns[1]: ‘new’}) 6. Option (A) is correct. Explanation: The mysql-connector-python package comprises of various functions that enable the connectivity and sharing between the front and back ends. 7. Option (B) is correct. Explanation: The pandas.read_sql(sql, sql_conn) is used to read either an sql query or an sql table (sql) into a DataFrame using the connection identifier (sql_conn) 8. Option (A) is correct. Explanation: The fillna() function replaces NaN values in pandas datasets. The replace() function helps in replacing null values. 9. Option (A) is correct. Explanation: In order to check null values in Pandas DataFrame, we use isnull() function. 10. Option (A) is correct. Explanation: The dropna() method removes the rows that contains NULL values. The dropna() method returns a new DataFrame object unless the inplace parameter is set to True , in that case the dropna() method does the removing in the original DataFrame instead.

[C] CASE BASED QUESTIONS 1. Option (B) is correct. Explanation: The output shows the sum of values in the numeric column. Hence the sum() function has to be used. 2. Option (A) is correct. Explanation: The output shows the average of the numeric columns “Age” and “Rating”. Hence the mean() function has to be used. 3. Option (C) is correct. Explanation: The count() function returns the number of non null observations in a dataset . 4. Option (B) is correct. Explanation: : The max() function is used to get the maximum age from the values. 5. Option (B) is correct. Explanation: The describe() function gives the mean, std and IQR values. And, function excludes the character columns and given summary about numeric columns. 6. Option (B) is correct. Explanation: The to_sql() function writes a dataframe to a Mysql table.

27

DATA HANDLING USING PANDAS II

7. Option (D) is correct. Explanation: The pymysql or the mysql-connector-python package needs to be installed using pip. 8. Option (D) is correct. Explanation: The read_sql_table() function requires the table name and the sql connection as parameters. 9. Option (B) is correct.

Explanation: The read_sql_query() function requires the SQL query and the Engine to be specified to extract data from a SQL database. 10. Option (D) is correct. Explanation: To create the engine the Mysql username , password and the database name need to be specified.

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

4

PLOTTING DATA USING MATPLOTLIB

  Revision Notes:

¾ To use this library for plotting purpose, we need to install pip install matplotlib

¾ Plotting Data Using Matplotlib:

¾ After installation, we need to import the library into the coding import matplotlib.pyplot as plt ¾ The Output of the matplotlib can be saved in the image format such as jpg or png. plt.savefig (‘a.png’) Chart Title

Y ticks

Comparison

Plotted Data

250 200 Number

Y axis

150 100 50

x ticks

0

2013

2014

Axis titles

2015

2016

2017

Year

Microsoft

Apple

X axis Alphabet

Legend

¾ Data Visualization: It is a form of recreating the data into visualization formats such as Line chart, bar graph etc. This visualization helps the user to understand the data quickly and in an effective manner. Instead of reading large text, we can just incorporated the all data into a single image. This incorporation helps the user to save time in reading the data and also useful for analyzing the data.

Scan to know more about this topic

Fig : Components of Plot

¾ The major parts of a Matplotlib plot are as follows: { Figure:

The container of the full plot and its parts

{ Title: The

Introduction to data visualization

Scan to know more about this topic

Matplotlib : An Introduction

¾ Matplotlib is a library which we need to import it first to work on it. ¾ It gets worked on all the visualization interface kit such as IPython Shell, NumPy.

title of the plot

{ Axes: The X and Y axis (some plots

may have a third axis too) plot

The main purpose of converting or plotting the data into visualization format is to create or compare the relationship between the variables. ¾ Matplotlib: Matplotlib is an visualization tool library in python especially made it for 2D arrays only. It provides quality figures or diagrams such as line chart, bar graph etc… in both hard copy and soft copy formats. These diagrams or visualizations are so much interactive. We can design as per our choice.



Scan to know more about this topic

{ Legend: Contains the labels of each

¾ Different types of Plots used in Matplotlib: { Line Plot { Bar Graph { Histogram { Pie Chart { Frequency Polygon { Box Plot { Scatter Plot

Plotting using Matplotlib

¾ Line Plot: It shows the frequency of the data in a number line. These data shows the growth or decline of the data based on the intervals. It is mainly used for 2D data. In this line graph, we can plot more than two or three complete set of data. (For e.g.: We can compare the sales of a company month wise, hence we have 12 line plots in a single graph). The syntax for plotting a line graph is: df. plot (kind = ‘line’).

Presents a listing of the data groups within the graph and often provides colors to make identification of the data group easier

It displays information as a series of data points called 'markers' connected by straight line segments Legend

Line chart

Histogram

aV t a

isualisa ti o

Label

First Level

It is a presentation of data in graphical format like bar, chart pie-chart, histogram etc

Second Level

Third Level

Provides positive identification of a particular data element or grouping

Matplotlib Python library developed by John Hunter and many other contributors, is used to create high quality graphs, charts and figures

Trace the Mind Map

Matplotlib

Define



It is an accurate representation of the distribution of numerical data in the form of rectangle

Bar chart



n 

D

It presents categorical data with stick like bars with height or lengths proportional to the values of data what they represent

PLOTTING DATA USING MATPLOTLIB

29

30 Oswaal CUET (UG) Chapterwise Question Bank ¾ General steps to create a Line plot : { First,

import the pyplot module.

{ Use

the .plot() method and provide a list of numbers to create a plot. { Use

the .show() method to display the plot.

¾ Bar graph: The Bar graph is used to compare between two different quantities. It is in the style of bars. These bars represent the X and Y data. It is also a continuous data based on the same intervals. (For e.g.: We can compare the sales of a company for 3 or 4 years). The syntax for plotting a bar graph is: df. plot (kind = ‘bar’). ¾ Histogram: Histogram is used to define the range of the values. It is also called as continuous bar graphs. (For e.g.: Comparing the height and weight of the students). To make a histogram, the data is stored into the bins and the data point or values in the bin has been counted. Based upon this count the height of the bar has been calculated. The height of the histogram is proportional to the data points. The syntax for plotting a histogram is: df. plot (kind = ‘hist’). ¾ Pie Chart: Pie chart is representation of the numerical data in a proportional manner. It is in the manner of circle and each circle is divided into number of sectors. Each sector represents a quantity. While drawing the pie plot, the column reference has to be passed and make the subplot as TRUE, if these references were not passed then by default, for each quantitiy, the Pie diagram will be drawn. The syntax for drawing the Pie diagram is :df. plot (kind = ‘pie’). ¾ Frequency Polygon: It is a frequency distribution graph. The number of observations have to be marked with a single point based on the interval and a straight line connects all these points. There is no separate function is available for polygon in matplotlib. The steps has to be followed for drawing a polygon is, { First,

plot a histogram

{ Mark

the mid point by using the values in the bin.

{ Draw

line for each point that which has to be adjacent to the other points.

{ Connect

the first point to the midpoint of x-axis.

{ Connect

the last point to the previous point in x-axis.

{ After

this, the frequency polygon is appeared over the histogram.

INFORMATICS PRACTICES

¾ Box Plot: It is generally used to represent the summary of the data. These represent generally five topics such as Minimum range value, Maximum range value, Upper quartile, Lower quartile and Median. (For e.g.: To assess the entrance examination result). This plot is very useful to identify the outliers value also. The values which will not appear in between the min value range or max value range are called as outlier value. This plot is useful for assessing a large data easily. The syntax for drawing a box plot is :df. plot (kind = ‘box’). ¾ Scatter Plot: It shows the relationship between two data. It is represented in the form of Dot or star. It is also called as correlation plot, because it shows how the data has been correlated so far. These plots were plotted along X and Y axis. The syntax for drawing scatter plot is : plt. scatter (x = value, y=value). ¾ Chart Customization parameters: { title:

Sets the title of the chart, which is passed as an argument.

{ ylabel: { xlabel

Sets the label of the Y-axis.

can be used to set the label of the X-axis.

{ yticks:

Sets which ticks to show on the Y-axis.

{ xticks

is the corresponding option for showing ticks on the X-axis.

{ legend:

Displays the legend on the plot. The loc argument of the legend() method sets the position of the legend on the graph.

¾ Customizing Plots: You can customize the charts or graphs with proper details. The graph or plot should have a proper title, labels, legends etc. ¾ Adding a title: To add a tittle in chart or graph title() function is used. { Syntax

: .title(title_string)

¾ Adding Labels: To set the labels for X-axis and Y-axis, xlabel() and ylabel() are used respectively. ¾ Adding Legends: When we plot multiple ranges on a single plot, it becomes necessary that legends are specified. To add legend to the plot, legend( ) function is used. ¾ Export Plots with Matplotlib : To save a figure as an image, you can use the savefig() method. The filename with the filepath should be provided as an argument to this method. plt.savefig(‘my_figure.png’)

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. The command used to save a plotted graph using pyplot function is _________ (A) plt.save() (B) plt.savefig() (C) plt.savepicture() (D) plt.saveimage() 2. Which command is used to show a chart? (A) chartshow() (B) show() (C) display() (D) showchart()

3. The function used to give title to a graph is __________ (A) plt.show() (B) plt.plot() (C) plt.title() (D) plt.titleshow() 4. The command used to show legends is ___________ (A) display() (B) show() (C) legend() (D) legends() 5. Which of the following is not a valid chart type? (A) lineplot (B) bargraph (C) histogram (D) statistical

31

PLOTTING DATA USING MATPLOTLIB

6. The command used to give a heading to a graph is ________ (A) plt.show()

(B) plt.plot()

(C) plt.xlabel()

(D) plt.title()

15. Which graph should be used where each column represents a range of values, and the height of a column corresponds to how many values are in that range? (A) plot

(B) line

7. Using Python Matplotlib__________can be used to count how many values fall into each interval.

(C) bar

(D) histogram

(A) lineplot

(B) bargraph

(A) chart

(B) figure

(C) histogram

(D) subplot

(C) axes

(D) application

16. The_________is a bounding box with ticks and labels.

8. Which of the following is not a valid plotting function of ‘pyplot‘?

17. __________ function is used to give x axis title.

(A) bar()

18. Plot() is used to create .................... chart.

(B) hist()

(C) histh()

(D) barh()

9. The command used to display the title for x-axis to a graph is ____________ (A) plt.xtitle()

(B) plt.xaxis()

(C) plt.xlabel()

(D) plt.saxistitle()

10. Out of the following, which function cannot be used for customization of charts in Python? (A) xlabel() (B) colour() (C) title()

(D) xticks()

11. What is the minimum number of arguments required for plot() function in matplotlib? (A) 1

(B) 2

(C) 3

(A) xtitle()

(B) xlabel() (C) title()

(D) x_title()

(A) line

(B) bar

(C) pie

(D) histogram

19. ___________option displays special information about the chart. (A) QR code()

(B) info()

(C) legend()

(D) hist()

20. Observe the following figure. Identify the coding for obtaining this as output.

(D) 4

12. __________is the function to save the graph. (A) Savefig()

(B) Savefigure()

(C) Savegraph()

(D) Savechart()

13.

(A) import matplotlib.pyplot as plt ( plt.plot([1, 2], [4, 5]) (B) import matplotlib.pyplot as plt plt.plot([1,2,3], [4,5,1]) plt. show() plt.show() (C) import matplotlib.pyplot as plt ( plt.plot([2,3], [5, 1]) (D) import matplotlib.pyplot as plt. plt.plot([1,3], [4,1]) plt. show() plt.show() 14. Read the statements given below and identify the right option to draw a histogram.

Statement A: To make a Histogram with Matplotlib, we can use the plt.hist() function.



Statement B: The bin parameter is compulsory to create histogram.

(A) Statement A is correct (B) Statement B is correct (C) Statement A is correct, but Statement B is incorrect (D) Statement A is incorrect, but Statement B is correct

(A) import matplotlib.pyplot as plt. x= [1,3,5] Y= [2,8,3] plt.plot(X, Y) plt.ylabel(‘x - axis’) plt.xlabel(‘y axis’) plt.title(‘Draw a line.”) plt.show() (B) import matplotlib.pyplot as plt X= [1,3,5] Y= [2,8,3] plt.plot(X, Y) plt.xlabel(‘x - axis’) plt.ylabel(‘y axis’) plt.title(‘Draw a line.”) plt.show() (C) import matplotlib.pyplot as plt x= [1,3,5] Y= [3, 2, 8] plt.plot(X, Y) plt.xlabel(‘x - axis’) plt.ylabel(‘y - axis’) plt.title(‘Draw a line.”) plt.show()

32 Oswaal CUET (UG) Chapterwise Question Bank (D) import matplotlib.pyplot as plt. X= [1,5, 3] Y= [2,8,3] plt.plot(X, Y) plt.xlabel(‘x - axis’) plt.ylabel(‘y - axis’) plt.title(‘Draw a line.”) plt.show() (B) ASSERTION REASON QUESTIONS Directions: In the following questions, A statement of Assertion (a) is followed by a statement of Reason (R). Mark the correct choice as. (A) Both A and R are true and R is the correct explanation for A. (B) Both A and R are true and R is not correct explanation for A. (C) A is true but R is false. (D) A is false but R is true. 1. Assertion (A): A chart plotted is not visible until it is shown using the show() function. Reason (R): The show() function displays and saves a chart. 2. Assertion (A): A horizontal bar chart is plotted using the bar() function . Reason (R): A horizontal bar chart shows the y-axis contents in the otherwise x-axis and x-axis contents in y-axis. 3. Assertion (A): A pie chart shows and data of one parameter with respect to objects. Reason (R): A pie chart shows the data as a part or percentage of an entire pie. 4. Assertion (A): The scatter chart is much like the line chart , only the data points are shown by scatters rather than continuous line. Reason (R): A scatter chart is plotted using the scatter() function. 5. Assertion (A): Legends are boxes that help to recognize the different plots using different colors or line styles indicating them. Reason (R): A legend is shown using the legend() function. 6. Assertion (A): A histogram is continuous plot showing frequency distribution. Reason (R): A histogram is plotted using the histogram() function. 7. Assertion (A): In a histogram the bins parameter is optional Reason (R): The border color of a histogram is specified using the bordercolor attribute. 8. Assertion (A): A Boxplot is a way to show a five-number summary in a chart. Reason (R): The boxplot() function plots a boxplot. 9. Assertion (A): The title of a chart is not compulsory to be provided. Reason (R): The chartlabel() function shows the chart title. 10. Assertion (A): Frequency polygons are helpful in comparing sets of data. Reason (R): They are good choice for displaying cumulative frequency distributions.

INFORMATICS PRACTICES

[C] CASE BASED QUESTIONS I. Read the following text and answer the questions that follow: (Q1-Q5) Mr. Sharma is working in a game development industry and he was comparing the given chart on the basis of the rating of the various games available on the play store.



He is trying to write a code to plot the graph. Help Mr. Sharma to fill in the blanks of the code and get the desired output.



import .......................... #Statement 1



Games=[“Subway Surfer”, “Temle Run”, “Canddy Crush”, “Bottle Best”]



Rating=[4.2, 4.8, 5.0, 3.8, 4.1]



plt. ......................(Games, Rating) #Statement 2



plt.xlabel(“Games”)



plt. ...................... (“Rating”) #Statement 3



plt. ...................... #Statement 4

1. Choose the right code from the following for statement 1. (A) matplotlib as plt

(B) pyplot as plt

(C) matplotlib.pyplot as plt

(D) matplotlib.plt as pyplot

2. Identify the name of the function that should be used in statement 2 plot the above graph. (A) line()

(B) bar ()

(C) hist()

(D) barh ()

3. Choose the correct option for the statement 3. (A) title(“Rating”)

(B) ytitle(“Rating”)

(C) ylabel(“Rating”)

(D) yaxis(“Rating”)

4. Choose the right function/method from the following for the statement 4 to display the chart. (A) display() (B) print()

(C) bar()

(D) show()

5. In case Mr. Sharma wants to change the above plot to the any other shape, which statement, should be change. (A) Statement 1

(B) Statement 2

(C) Statement 3

(D) Statement 4

II. Read the following text and answer questions that follow: (Q6-Q10)

The following bar chart has been plotted to display the India Medal Tally in Olympics and the following code has been written to plot the chart.

33

PLOTTING DATA USING MATPLOTLIB



plt. ....................(‘Medal Type’) #Blank4



plt.title(‘Indian Medal tally in Olympics’)



plt.show()



.......................#Blank5

6. What should be the content of #Blank1 (A) pyplot (B) qlalchemy (C) pandas (D) dataframe 7. What should be the content of #Blank2 (A) 20,15,18 (B) [30,20,18] (C) [20,15,18] (D) [10,20,30] 8. What should be the content of #Blank3 (A) bar (B) barh (C) hist (D) line 9. What should be the content of #Blank4 (A) label (B) ylabel (C) xlabel (D) title 10. What should be the written in #Blank5 to save the chart. (A) savechart(“f1.jpg”) (B) savefig(“f1.jpg”) (C) savepic(“f1.jpg”) (D) None of these



Write answers for with respect to the code given :



import matplotlib. .................... as plt # Blank1



Category=[‘Gold’,’Silver’,’Bronze’]



Medal=.................... #Blank2



plt. ....................(Category,Medal) #Blank3



plt.ylabel(‘Medal’)

ANSWER KEY [A] MULTIPLE CHOICE QUESTIONS 1. (B)

2. (B)

11. (A)

12. (A)

1. (C)

2. (D)

3. (C) 13. (B)

4. (C)

5. (D)

6. (D)

7. (C)

8. (C)

9. (C)

10. (B)

14. (C)

15. (D)

16. (C)

17. (B)

18. (A)

19. (C)

20. (B)

8. (B)

9. (C)

10. (A)

8. (A)

9. (C)

10. (B)

[B] ASSERTION REASON QUESTIONS 3. (A)

4. (B)

5. (B)

6. (C)

7. (C)

[C] CASE BASED QUESTIONS 1. (C)

2. (B)

3. (C)

4. (D)

5. (B)

6. (A)

7. (C)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS

1. Option (B) is correct. Explanation: The figure created can be saved to our local machines by using savefig() method 2. Option (B) is correct. Explanation: plt.show() is used to display the figure, where plt is an alias. 3. Option (C) is correct. Explanation: The title() method in matplotlib module is used to specify title of the visualization depicted and displays the title using various attributes. 4. Option (C) is correct. Explanation: In the matplotlib library, there’s a function called legend() which is used to place a legend on the axes. The attribute loc in legend() is used to specify the location of the legend. 5. Option (D) is correct. Explanation: Python provides different types of plots such as Bar Graph, Histogram, Scatterplot, Area plot, Pie plot for viewing the data.

6. Option (D) is correct. Explanation: plt.title() can be used to display the title of a plot. 7. Option (C) is correct. Explanation: A Histogram visualises the distribution of data over a continuous interval or certain time period. 8. Option (C) is correct. Explanation: matplotlib.pyplot is a collection of functions that make matplotlib work like MATLAB. Each pyplot function makes some changes to a figure: e.g., creates a figure, creates a plotting area in a figure, plots some lines in a plotting area, decorates the plot with labels, etc. 9. Option (C) is correct. Explanation: plt.xlabel() and plt.ylabel() are used to set the x and y label of the plot. 10. Option (B) is correct. Explanation: The xlabel() function in Pyplot module of matplotlib library is used to set the label for the x-axis. plt.title() can be used to display the title of a plot.o xticks is the corresponding option for showing ticks on the X axis.

34 Oswaal CUET (UG) Chapterwise Question Bank 11. Option (A) is correct. Explanation: Only one argument/set of points is required in plot( ) function. By default, the set of points will be considered as Y coordinates. 12. Option (A) is correct. Explanation: Savefig() is the function to save the graph. 13. Option (B) is correct. Explanation: Option B is the program code which will produce the given output. 14. Option (C) is correct. Explanation: hist() function from the matplotlib library is used to create a histogram but bin parameter is not necessary to create a histogram. The purpose of bin is to distribute the histogram into different sectors.A histogram displays numerical data by grouping data into “bins” of equal width. Each bin is plotted as a bar whose height corresponds to how many data points are in that bin. Bins are also sometimes called “intervals”, “classes”, or “buckets”. So, option C is the correct option. 15. Option (D) is correct. Explanation: Histogram should be used where each column represents a range of values and the height of a column corresponds to how many values are in that range. 16. Option (C) is correct. Explanation: The axes is a bounding box with ticks and labels. The Axes contains most of the figure elements: Axis , Tick , Line2D , Text , Polygon , etc., and sets the coordinate system. 17. Option (B) is correct. Explanation: xlabel( txt ) labels the x-axis of the current axes or standalone visualization. Reissuing the xlabel command replaces the old label with the new label. xlabel( target , txt ) adds the label to the specified target object. 18. Option (A) is correct. Explanation: The plot() function is used to draw points (markers) in a diagram. By default, the plot() function draws a line from point to point 19. Option (C) is correct. Explanation: A legend is an area describing the elements of the graph. In the matplotlib library, there’s a function called legend() which is used to Place a legend on the axes. The attribute Loc in legend() is used to specify the location of the legend. Default value of loc is loc=”best” (upper left). 20. Option (B) is correct. Explanation: code given in option (B) is correct [B] ASSERTION REASON QUESTIONS 1. Option (C) is correct. Explanation: The show() function must be called to display a chart. It does not save the chart. 2. Option (D) is correct. Explanation: A horizontal bar chart is plotted using the barh() function . It shows the data in reverse axis with respect to the vertical bar chart 3. Option (A) is correct. Explanation: A Pie chart shows a comparison of data values as parts / slices of an entire circle.

INFORMATICS PRACTICES

4. Option (B) is correct. Explanation: Line charts show the data plotted using a continuous line whereas in a scatter chart, the data points are shown using markers or points in the x-y plane. 5. Option (B) is correct. Explanation: The legend boxes in a chart are useful when more than one plot is shown and they help to recognize the different plots. 6. Option (C) is correct. Explanation: A histogram is not like other charts to show comparative scores or results of objects, rather it shows a frequency distribution. It is plotted using the hist() function. 7. Option (C) is correct. Explanation: The bins parameter for a histogram is optional . The border color of a histogram is specified using the edgecolor attribute. 8. Option (B) is correct. Explanation: A boxplot is plotted using the boxplot() function and shows the first quartile, third quartile, minimum , maximum and median. 9. Option (C) is correct. Explanation: The title() function shows the chart title and is not must to be provided in a chart. 10. Option (A) is correct. Explanation: In frequency polygons, the number of observations are marked with a single point at the middle of an interval. A straight line then connects each set of points. Thus they make it easy to compare two or more distributions on the same set of axes. [C] CASE BASED QUESTIONS 1. Option (C) is correct. Explanation: The matplotlib.pyplot module is used to create charts. 2. Option (B) is correct. Explanation: The bar() function is used to plot a bar chart. 3. Option (C) is correct. Explanation: The ylabel() function is used to display the y-axis label. 4. Option (D) is correct. Explanation: The show() function displays the chart. 5. Option (B) is correct. Explanation: The Statement 2 is used to plot the chart , hence to change the plot, the statement 2 needs to be changed. 6. Option (A) is correct. Explanation: To plot charts the matplotlib.pyplot needs to be imported.

module

7. Option (C) is correct. Explanation: Since the y-axis values are at [20,15,18] , the values for the Medals that are plotted in y-axis should be [20,15,18]. 8. Option (A) is correct. Explanation: A bar chart is plotted using the bar() function.

35

PLOTTING DATA USING MATPLOTLIB

9. Option (C) is correct.

10. Option (B) is correct.

Explanation: To display the x-axis label the xlabel function is used.

Explanation: The savefig() function is used to save a chart as a jpg file.

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

5

INTRODUCTION TO COMPUTER NETWORKS

  Revision Notes:

¾ Computer Networks: A computer network is an interconnected collection of computers that allows sharing of resources and information. Computers may connect to each other by either wired or wireless media. Computer network uses distributed processing in which task is divided among several computers. { Types

of Network: A computer network can be categorized by its size. A computer network is mainly of four types: LAN(Local Area Network), MAN(Metropolitan Area Network), WAN(Wide Area Network).

Scan to know more about this topic

Classification of Computer Networks

{ Metropolitan Area Network (MAN): It covers up to 50 km of area. MAN is larger than a LAN but smaller than a WAN. MANs are usually characterised by high speed connections. They are usually operated by a single entity such as a government body or larger corporation. It expands throughout a city such as a cable TV network. { Wide

Area Network (WAN): It spans a large geographical area often a country or a continent. Internet is the largest WAN. Wide area networks are widely used in the field of business, government, education etc. ¾ Network Devices { Modem:

Modems (MOdulators-DEModulators) are used to transmit digital signals over analog telephone lines. Digital signals are converted by the modem into analog signals of different frequencies and transmitted to a modem at the receiving location.

{ Switch:

Switches generally have a more intelligent role than hubs. It maintains limited routing information about nodes in

{ Repeater: It is an electronic device that amplifies the signal it receives. Repeaters work on the physical layer. { Router: Routers help transmit packets to their destinations by charting a path through the sea of interconnected networking devices using different network topologies. Routers are also used to divide internal network into two or more subnetworks. { Gateway: It is a network device that is used to connect two or more dissimilar networks. A gateway usually is a computer with multiple Mics connected to different networks.

{ Local Area Network (LAN): It is a network where two or more computers are connected within 1 km. LAN exists within a campus. It is owned by a single organisation. Many expensive resources are shared through LAN. There is a limit on the number of computers that can be attached to a single LAN.

{ Hub: It connects multiple computer networking devices together. A hub also acts as a repeater in that it amplifies signals that deteriorate after travelling long distances over connecting cables.

the internal network, and it allows connections to systems like hubs or routers.

Scan to know more about this topic

¾ Network Topology: Topology defines the structure of the network of how all the components are interconnected to each other. Some common network topologies are as follows: ¾ Star Topology: Star topology is an arrangement of the network in which every node is connected to the central hub, switch or a central computer. The central computer is known as a server, and the peripheral devices attached to the server are known as clients. Hubs or Switches are mainly used as connection devices in a physical star Scan to know more about topology. this topic { Advantages

of Star topology:

ƒ Efficient troubleshooting ƒ Network control ƒ High data speeds { Disadvantages

of Star topology:

ƒ A Central point of failure ƒ Cable required ¾ Bus topology: The bus topology is designed in such a way that all the stations are connected through a single cable known as a backbone cable. Each node is either connected to the backbone cable by drop cable or directly connected to the backbone cable. When a node wants to send a message over the network, it puts a message over the network. { Advantages

of Bus topology:

ƒ Low-cost cable. ƒ Moderate data speeds. ƒ Limited failure.

Network Dvices

Network Topology

{ Disadvantages

of Bus topology:

ƒ Extensive cabling

First Level

Second Level

Trace the Mind Map

Third Level

MAN stands for metropolitan area network. It cover upto few kilometers e.g. the houses and colonies of a city e.g. MTNL.

LAN stands for local area ne t work, cover upto one kilometer as building or campus. e.g. Ethernet.

L AN Types of Network

WAN stands for wide area network, it covers a large geographical area after a country or confinement. e.g. Internet.

It converts digital signal to analog signal and vice-versa.

Network Devices

Network devices are the units that mediate data in a computer network and also called network equipments.

It acts as a centralised connection to several computers with the central node or server.

Define

Introduction to Computer Networks

o Compute t n

Internet

The Internet is a world-wide system of computer networks i.e., a network of networks.

Network Topology

It is the arrangement of the terminals or workstations of a computer network.

Introductio

te Ga

A router is a networks device that routes data pockets based on their I.P. addresses.

It is used to connect dissimilar networks. Gateway connects the routers.

It is used to amplify the signals when they are transmitted over a long distance.

It is used to connect devices of the network into smaller subsets of LAN segments.

A computer network is a collection of independent computers and other hardware interconnected by communication channels that allows sharing of resources and information.

h

it c Sw

Types

ay

• Bus Topology • Star Topology • Mesh Topology • Tree Topology



WAN



tworks



e rN

w

Applications: *Website *WebPage *Web Server *Web Hosting *Web *email *Chat *VoIP

INTRODUCTION TO COMPUTER NETWORKS

37

38 Oswaal CUET (UG) Chapterwise Question Bank ƒ Difficult troubleshooting ƒ Reconfiguration difficult ¾ Tree topology: Tree topology combines the characteristics of bus topology and star topology. A tree topology is a type of structure in which all the computers are connected to each other in a hierarchical fashion. The top-most node in tree topology is known as a root node, and all other nodes are the descendants of the root node. { Advantages

of tree topology:

ƒ Support for broadband transmission ƒ Easily expandable ƒ Point-to-point wiring { Disadvantages

of tree topology:

ƒ Difficult troubleshooting ƒ High cost ƒ Reconfiguration difficult. ¾ Mesh: A mesh topology is a type of computer network in which each node (computer or other device) is connected to every other node in the network. { Advantages

of Mesh Topology :

ƒ Failure during a single device won’t break the network. ƒ It provides high privacy and security. ƒ A mesh doesn’t have a centralized authority. { Disadvantages

of Mesh Topology :

ƒ Installation is extremely difficult in the mesh. ƒ Maintenance needs are challenging with a mesh. ƒ Complex process. ¾ Internet: The Internet is a world-wide system of computer networks i.e., a network of networks. Through the Internet, computers become able to exchange information with each other and find diverse perspectives on issues from a global audience. All computers on the Internet, communicate with one another using TCP/IP, which is a basic protocol of the Internet. ¾ URL: URL stands for Uniform Resource Locator. A URL is a type of uniform resource identifier and is the address of a resource on the World Wide Web and the protocol used to access it. It is used to indicate the location of a web resource to access the web pages. ¾ World Wide Web: World Wide Web, which is also known as a Web, is a collection of websites or web pages stored in web servers and connected to local computers through the internet. These websites contain text pages, digital images, audios, videos, etc. ¾ Applications of World Wide Web: The World Wide Web allows users to interact with a graphic interface to search information in a hypermedia and multimedia environment. Graphics serve as reference points on the World Wide Web for searching and retrieving information. { Web:Web is the common name for the World Wide Web, a subset of the Internet consisting of the pages that can be accessed by a Web browser. Many people assume that the Web

INFORMATICS PRACTICES

is the same as the Internet, and use these terms interchangeably. However, the term Internet actually refers to the global network of servers that makes the information sharing that happens over the Web possible. So, although the Web does make up a large portion of the Internet, but they are not one and the same. { E-mail: E-mail is defined as the transmission of messages on the Internet. It is one of the most commonly used features over communications networks that may contain text, files, images, or other attachments. Generally, it is information that is stored on a computer and sent through a network to a specified individual or group of individuals.

ƒ The format of an mail address is username@domainname. Where • username identifies a unique user name. • @ separates the user name from the domain name. • domain_name identifies the mail server. ¾ Chat: Chat is a text-based communication that is live or in real-time. For example, when talking to someone in chat any typed text is received by other participants immediately. ¾ VoIP: Voice over Internet Protocol (VoIP), is a technology that allows you to make voice calls using a broadband Internet connection instead of a regular (or analog) phone line. Some VoIP services may only allow you to call other people using the same service, but others may allow you to call anyone who has a telephone number - including local, long-distance, mobile, and international numbers. { Web

site:

Introduction: A website is a collection of publicly accessible, interlinked Web pages that share a single domain name. Websites can be created and maintained by an individual, group, business or organization to serve a variety of purposes. { Web page: A webpage is a document written in HTML and can be viewed on any web browser. It is contained within the web server, which can be accessed by entering the URL for that web page, and once it is loaded, it appears on the user’s web browser. Each webpage is linked with a unique URL; hence two pages cannot have the same URL.

(a) Static Web Page:Static web pages are made of “fixed code,” and unless the site developer makes changes, nothing will change on the page. Think of it like a brochure for a business. Static sites give a lot of the same type of information that you could get from a brochure, but it can’t just change itself. (b) Dynamic Web Page: It is a web page that includes content that is updated regularly. This type of page is often used for news sites or blogs, where new content is added frequently. ¾ Web server: A web server is a dedicated computer responsible for running websites sitting out on those computers somewhere on the Internet. They are specialized programs that circulate web pages as summoned by the user. The primary objective of any web server is to collect, process and provide web pages to the users.

39

INTRODUCTION TO COMPUTER NETWORKS

¾ Web hosting: Web hosting is an online service that enables you to publish your website or web Scan to know application on the Internet. When you sign more about this topic up for a web hosting service, you basically rent some space on a physical server where you can store all the files and data necessary for your website to work properly. Introduction to Web Browser

¾ Web browser:

¾ Introduction: A browser is a software program that is used to explore, retrieve, and display the information available on the World Wide Web. This information may be in the form of pictures, web pages, videos, and other files that all are connected via hyperlinks and categorized with the help of URLs (Uniform Resource Locator). Some common web browsers are: Internet Explorer, Google Chrome, Apple’s Safari, etc. { Browser setting: Every Internet browser has settings you can change, including privacy options, security settings, search engine preferences, autofill and autocomplete behavior, and more.

{ add-ons: Add-ons are tools which integrate into your browser. They are similar to regular apps or programs, but only run when the browser runs. Add-ons can allow the viewing of certain types of web content, such as Adobe Flash player for YouTube videos, etc. Add-ons can work within the framework of the browser provided or they can provide separate functions, such as adding a status bar. { plug-ins: Plug-ins are software additions that allow for the customization of computer programs, apps and web browser as well as the customization of the content offered by websites. While plugins continue to be used by add-ons to customize programs and apps, and their use in web browsers has decreased somewhat, in favor of using browsers extensions instead. { Cookies: Cookies are messages that web servers pass to your web browser when you visit Internet sites. Your browser stores each message in a small files, called cookies txt. When you request another page from the server, your browser sends the cookies back to the server. These files typically contain information about your visit to the web page as well as any information you have volunteered.

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. _______was the first Web browser developed by the National Centre for Supercomputing Application (NCSA) (A) Mozilla Firefox (B) Opera [CUET 2022] (C) Mosaic (D) Google Chrome 2. Given below are two statements: [CUET 2022] Statement I: All switches are hubs. Statement ll: All hubs are switches. In the light of the above statements, choose the most appropriate answer from the options given below. (A) Both statement I and statement II are correct. (B) Both statement I and statement II are incorrect. (C) Statement l is correct but Statement ll is incorrect (D) Statement l is incorrect but Statement ll is correct 3. _____ is a service that allows us to put a website or a web page onto the Internet and make it a part of the World Wide Web. [CUET 2022] (A) Web server (B) Web hosting (C) Web site (D) Web upload 4. Which of the following can be handled by a gateway? (A) Protocol conversion [CUET 2023] (B) Packet resizing (C) Data encapsulation (D) Regeneration of weakened signals 5. Match List I with List II: [CUET 2023] List -I (a) Repeater

(b) Switch

List - II (I)

(Il)

device that receive data, analyse and transmits it to other networks Serves as the entry/exit point of a network

(c)

Router

(d) Gateway

(Ill)

regenerate the signals on the cables to which it is connected

(IV) device used to connect multiple computers

Choose the correct answer from the options given below: (A) (a)-(II), (b)-(IV), (c)-(III), (d)-(I) (B) (a)-(III), (b)-(IV), (c)-(I), (d)-(II) (C) (a)-(I), (b)-(II), (c)-(III), (d)-(IV) (D) (a)-(II), (b)-(IV), (c)-(I), (d)-(III) 6. It is easy to identify and isolate the fault in which of the following topology [CUET 2023] (A) Mesh (B) Bus (C) Ring (D) Hybrid 7. Which one is not an example of web browser?  (A) Mozilla Firefox (C) Opera 8. Match List I with List II List -I

[CUET 2023] (B) Apple Safari (D) Yahoo List - II

(a) Computer Network

(I)

Used to set up a wired network

(b) Networking devices

(Il)

Used for conversion between electric signals and digital bats

(c)

(Ill) Network Interface Card

(d) Modulator Demodulator

Used to connect multiple computers in different settings

(IV) Allows computer to share data and resources among each other

40 Oswaal CUET (UG) Chapterwise Question Bank Choose the correct answer from the options given below: (A) (a)-(I), (b)-(II), (c)-(IV), (d)-(III) (B) (a)-(IV), (b)-(III), (c)-(II), (d)-(I) (C) (a)-(III), (b)-(IV), (c)-(II), (d)-(I) (D) (a)-(II), (b)-(I), (c)-(III), (d)-(IV) 9. Which of the following devices forwards packets between networks by processing the routing information included in the packet? (A) firewall (B) bridge (C) hub (D) router 10. For web pages the information is changed frequently, for example, stock prices, weather information out of the following options would you advise ? [C] (A) Static webpage (B) Dynamic webpage (C) Both A and B (D) None of these 11. Which term identifies a specific computer on the web and the main page of the entire site? (A) WWW (B) Link (C) SQL (D) URL 12. Television cable network is an example of:  [U] (A) LAN (B) WAN (C) MAN (D) Internet 13. What is a standalone computer system ? (A) It is a computer system with internet connectivity (B) It is a server (C) It is a computer without any networking (D) None is correct

[U]

14. Which device is used to transfer Communication Signal to Long Directions ? [U] (A) Amplifier (B) Repeater (C) Router (D) All of these 15. Which network topology has a central device, which brings all the signals together? (A) Bus (B) Star (C) Ring (D) Hybrid

INFORMATICS PRACTICES

20. What is the name of the browser developed and released by Google? (A) Chrome (B) GooglyGoogle (C) Heetson (D) Titanium (B) ASSERTION REASON QUESTIONS In the questions given below, there are two statements marked as Assertion (A) and Reason (R). Read the Statements and choose the correct option: Options are: (A) Both (A) and (R) are true and (R) is the correct explanation of (A). (B) Both (A) and (R) are true but (R) is not the correct explanation of (A). (C) (A) is correct but (R) is wrong. (D) (A) is wrong but (R) is correct. 1. Assertion (A): The Internet is world wide system of computer networks i.e., network of networks.

Reason (R): All computer on the Internet, communicate with one another using POP/IMAP, which is a basic protocol of the Internet.

2. Assertion (A): Static Webpage contains content that do not change.

Reason (R): They may only change if the actual HTML file is manually edited.

3. Assertion (A): Browser is the software to access internet based webpages in the computer.

Reason (R): Local Area Network (LAN) is a network where two or more computers are connected within 1 km. 

4. Assertion (A): The repeater is a device that amplifies the network over geographical distance.

Reason (R): A hub is a device which is used to connect more than one device in the network.

16. The two basic parts of URLs are : (A) TCP and FTP (B) The protocol and the domain name (C) TCP/IP and ISP (D) Destination and device

5. Assertion (A): Cookies are plain text files.

17. What does Router do in a network? (A) Forwards a packet to all outgoing links (B) Forwards a packet to the next free outgoing link (C) Determines on which outgoing link a packet is to be forwarded (D) Forwards a packet to all outgoing links except the originated link. 18. A collection of hyperlinked documents on the internet forms the: (A) World Wide Web (WWW) (B) E-mail system (C) Mailing list (D) Hypertext markup language 19. Email address separates the user name from the domain name using the ___ symbol. (A) * (B) @ (C) ! (D) ˄



Reason(R): Cookies store the Profile picture on Social Media. 6. Assertion (A): VoIP stands for Voice over Internet Protocol. Reason (R): It is a technology that allows you to make voice calls using a broadband internet connection instead of a regular phone line.

7. Assertion (A): Internet cookies are text files that contain small pieces of data, like a username, password and user’s preferences while surfing the internet.

Reason (R): To make browsing the Internet faster & easier, its required to store certain information on the server’s computer.

8. Assertion (A): The web is the common name for the World Wide Web, a subset of the Internet consisting of the pages that can be accessed by a web browser.

Reason (R): URL is a unique identifier used to locate a resource on the Internet. 9. Assertion (A): e-mail stands for environmental mail. Reason (R): e-mail is a paperless method of sending messages, notes, pictures and even sound files from one place

41

INTRODUCTION TO COMPUTER NETWORKS

to another using the Internet as a medium. ADMIN Examination 10. Assertion (A): URL stands for Uniform Run Line. Reason (R): The First Page we generally view when we open the browser is called home page.

[C] CASE BASED QUESTIONS I. Read the following text and answer the questions that follow: (Q1-Q5) Prime Computer services Ltd. is an international educational organization. It is planning to set up its India campus at Mumbai with its head office in Delhi. The Mumbai office campus has four main buildings-ADMIN, ACCOUNTS, EXAMINATION and RESULT. You as a network expert have to suggest the best network related solutions for their problems raised in (i) to (v), keeping in mind the distances between the buildings and other given parameters. DELHI HEAD OFFICE





MUMBAI CAMPUS EXAMINATION

ACCOUNTS

ADMIN

RESULT

Shortest distances between various buildings: ADMIN TO ACCOUNTS

55 m

ADMIN TO EXAMINATION ADMIN TO RESULT ACCOUNTS TO EXAMINATION

90 m 50 m 55 m

ADMIN 110 ACCOUNTS 75 EXAMINATION 40 RESULT 12 DELHI HEAD OFFICE 20 1. Suggest the most appropriate location of the server inside the MUMBAI campus (out of the four buildings) to get the best connectivity for maximum number of computers. Justify your answer. (A) Accounts (B) Result (C) Admin (D) Examination 2. Suggest the cable layout to efficiently connect various buildings within the MUMBAI campus for a wired connectivity.

(A) ADMIN

(B)

ADMIN

Result

ADMIN

Examination

Accounts

Result

(C) (D) None of these 3. Which networking device will you suggest to be procured by the company to interconnect all the computers of various buildings of MUMBAI campus? (A) Switch

(B) Gateway

(C) Router

(D) Repeater

4. Company is planning to get its website designed which will allow students to see their results after registering themselves on its server. Out of the static or dynamic, which type of website will you suggest? (A) Static (B) Dynamic (C) Pages with Client-Server Functionality (D) Both (A) and (B) 5. Expand the LAN: (A) Line Area Network (C) Local Access Network

ACCOUNTS TO RESULT 50 m EXAMINATION TO RESULT 45 m DELHI Head Office to MUMBAI campus 2150 m Number of computers installed at various buildings are as follows:

Examination

Accounts

(B) Local Area Network (D) None of these

II. Meerut school in Meerut is starting up the network between its different wing,. There are four buildings named as S, J, A and H. The distance between various buildings is as follows:



A to S 200 m

Name

A to J 150 m

Abhishek

A to H 50 m

Prateek

S to J 250 m

Sneha

S to H 350 m

Nancy

J to H 350 m

Himanshu

Numbers of computers in each Buildings S

130

J

80

A

160

H

50

6. What type of topology is best suited for above network? (A) Star topology

(B) Bus topology

(C) Ring topology

(D) Mesh topology

7. Suggest the most suitable place (i.e. building) to house the server of this school. (A) Building S

(B) Building J

Accounts

(C) Building A

(D) Building H

Result

(A) Switch/Hub

Examination

8. Which one of the following devices will you suggest for connecting all the computers with in each of their buildings?

Accounts

(B) Modem

(C) Telephone (D) Repeater Result 9. The school is planning to link its head office situated in New Delhi with the offices in hilly areas. Suggest a way to

42 Oswaal CUET (UG) Chapterwise Question Bank connect it economically: (A) Micro waves (C) Fibre optic

INFORMATICS PRACTICES

10. The company wants internet acessibility in all the blocks. The suitable and cost-effective technology for that would be: (A) Satellite (B) Lease line (C) Telephone line (D) Broadband

(B) Coaxial cable (D) Radio waves

ANSWER KEY [A] MULTIPLE CHOICE QUESTIONS 1. (C)

2. (C)

3. (B)

4. (A)

5. (B)

6. (A)

7. (D)

8. (B)

9. (D)

10. (B)

11. (D)

12. (C)

13. (C)

14. (B)

15. (B)

16. (B)

17. (C)

18. (A)

19. (B)

20. (A)

8. (B)

9. (D)

10. (D)

8. (A)

9. (C)

10. (B)

[B] ASSERTION REASON QUESTIONS 1. (C)

2. (A)

3. (B)

4. (B)

5. (C)

6. (A)

7. (C)

[C] CASE BASED QUESTIONS 1. (C)

2. (B)

3. (C)

4. (D)

5. (B)

6. (A)

7. (C)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS 1. Option (C) is correct. Explanation: Mosaic was created at the National Center for Supercomputing Applications (NCSA) at the University of Illinois Urbana-Champaign by computer scientist Marc Andreessen. It was the very first popular web browser and the early ancestor of Mozilla Firefox. 2. Option (C) is correct. Explanation: A Hub is a broadcast device that sends data from one node to all nodes but a Switch is a multicast device that can send data to a particular node. 3. Option (B) is correct. Explanation: Web hosting is a service that allows organizations and individuals to post a website or web page onto the Internet. A web host, or web hosting service provider, is a business that provides the technologies and services needed for the website or webpage to be viewed in the Internet. 4. Option (A) is correct. Explanation: A protocol gateway is a device that converts from one protocol to another to allow communication between devices. 5. Option (B) is correct. Explanation: A repeater is a powerful network hardware device that regenerates an incoming signal from the sender before retransmitting it to the receiver. It is also known as a signal booster, and it helps in extending the coverage area of networks. A switch is a device in a computer network that connects other devices together. Multiple data cables are plugged into a switch to enable communication between different networked devices. A router is a gateway that passes data between one or more local area networks (LANs). Routers use the Internet Protocol (IP) to send IP packets containing data and IP addresses of sending and destination devices located on separate local area networks. A gateway is a network node that forms a passage between two networks operating with different transmission protocols. 6. Option (A) is correct.

Explanation: Mesh topology has many benefits, including high speed, scalability, security, and fault isolation. It does, however, have some drawbacks, such as high expense, complexity, bandwidth problems, constrained scalability, and redundancy. 7. Option (D) is correct. Explanation: Yahoo is a search engine ,it is not a web browser. 8. Option (B) is correct. Explanation: Computer network allows computer to share data and resources among each other. Networking devices are use to connect multiple computers in different settings. Modulator Demodulator is used for conversion between electric signals and digital bits. Network Interface Card is used to set up a wired network. 9. Option (D) is correct. Explanation: A router is a networking device that forwards data packets between computer networks. Routers perform the traffic directing functions on the Internet. They make use of routing protocols like RIP to find the cheapest path to the destination. 10. Option (B) is correct. Explanation: A dynamic web page is a web page that displays different content each time it’s viewed. For example, the page may change with the time of day, the user that accesses the webpage, or the type of user interaction. There are two types of dynamic web pages: Client side Scripting and Server-side Scripting. 11. Option (D) is correct. Explanation: Just as buildings and houses have a street address, webpages also have unique addresses to help people locate them. On the Internet, these addresses are called URLs (Uniform Resource Locators). 12. Option (C) is correct. Explanation: Television cable network is an example of MAN. A metropolitan area network (MAN) is a computer network that connects computers within a metropolitan area, which could be a single large city, multiple cities and towns, or

43

INTRODUCTION TO COMPUTER NETWORKS

any given large area with multiple buildings. 13. Option (C) is correct. Explanation: A desktop or laptop computer that is used on its own without requiring a connection to a local area network (LAN) or wide area network (WAN). When the computer is running local applications without Internet access, the machine is technically a stand-alone PC. 14. Option (B) is correct. Explanation: A repeater is an electronic device in a communication channel that increases the power of a signal and retransmits it, allowing it to travel further. Since it amplifies the signal, it requires a source of electric power. Use of the term has continued in telephony and data communications. 15. Option (B) is correct. Explanation: A star topology is a topology for a Local Area Network (LAN) in which all nodes are individually connected to a central connection point, like a hub or a switch. 16. Option (B) is correct. Explanation: URL is an acronym for Uniform Resource Locator and is a reference (an address) to a resource on the Internet. A URL has two main components: Protocol identifier: For the URL http://example.com , the protocol identifier is http. Domain name: For the URL http://example.com ,the domain name is example.com . 17. Option (C) is correct. Explanation: A router is a device that provides Wi-Fi and is typically connected to a modem. It sends information from the internet to personal devices like computers, phones, and tablets. These internet connected devices in your home make up your Local Area Network (LAN). 18. Option (A) is correct. Explanation: The World Wide Web (“WWW” or “The Web”) is the part of the Internet that contains websites and webpages. 19. Option (B) is correct. Explanation: The @ (at) symbol is used to separate the user id from the domain name in the e-mail address. The e-mail address is in the form, [email protected] 20. Option (A) is correct. Explanation: Google released its own www browser in late 2008. It’s free and the version for Windows XP and Vista was released first. It provides enhanced security features, it addition to a speedy interface.

[B] ASSERTION REASON QUESTIONS 1. Option (C) is correct. Explanation: The Internet is a vast network that connects computers all over the world. Through the Internet, people can share information and communicate from anywhere with an Internet connection. All computer on the Internet, communicate with one another using TCP/IP, which is a basic protocol of the Internet. 2. Option (A) is correct. Explanation: A static web page is a web page that is delivered to the user’s web browser exactly assorted, in contrast to dynamic web pages which are generated by a web application. 3. Option (B) is correct. Explanation: A web browser is application software for ac-

cessing the World Wide Web. When a user follows the URL of a web page from a particular website, the web browser retrieves the necessary content from the website’s web server and then displays the page on the user’s device. A local area network is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. Home Wi-Fi networks and small business networks are common examples of LANs. 4. Option (B) is correct. Explanation: Repeater has two ports: one for incoming signal and another one for “boosted outgoing signal. Hub is able to join more than two signals. It takes the signal, “boosts” it, and transmits to all its ports. Typically hub can connect from 8 to 24 connections together. 5. Option (C) is correct. Explanation: Cookies are plain text files which store the browsing-related information on user’s computer. These enable you to save password for the website and all the customer setting for the website in the browser for later visits. You can enable or disable cookies from browser settings. You can either allow or block third-party cookies on your browser. 6. Option (A) is correct. Explanation: A VoIP phone system is a technology to make phone calls through your internet connection instead of a regular landline or a mobile network. A VoIP system converts analog voice signals into digital signals over your broadband connection. A VoIP server is used to connect calls to other telephone networks. 7. Option (C) is correct. Explanation: Managing your open tabs more efficiently will also help you browse faster. 8. Option (B) is correct. Explanation: WWW is the set of linked hypertext documents that can be viewed on web browsers (such as Firefox, Google Chrome, and more). URL stands for Uniform Resource Locator, and is used to specify addresses on the World Wide Web. 9. Option (D) is correct. Explanation: E-mail stands for Electronic Mail. It is a paperless method of sending messages, notes, pictures and even sound files from one place to another using the Internet as a medium. E-mail address is an individual name which is used to send and receive e-mail on the Internet. 10. Option (D) is correct. Explanation: URL stands for Uniform Resource Locator, and is used to specify addresses on the World Wide Web. A “homepage” or “startup page” is the page your web browser opens when you first run the software, and the page it returns to when you click on the “Home” button in the browser’s toolbar.

[C] CASE BASED QUESTIONS 1. Option (C) is correct. Explanation: Server should be installed in Admin department as it has maximum number of computers. 2. Option (B) is correct. Explanation:

44 Oswaal CUET (UG) Chapterwise Question Bank examination

ADMIN

accounts

Result Star topology 3. Option (A) is correct. Explanation: Switch : It is a device use to connect multiple computer to create a networking. 4. Option (B) is correct. Explanation: Dynamic: Dynamic web pages has an ability to changes the content or layout with every request to the web server. 5. Option (B) is correct. II. 6. Option (A) is correct. Explanation: The Star topology network is easy to setup and comparatively inexpensive. The star topology is configured by connecting all of the nodes on the network to central device. The central connection allows the network to continue functioning even if a single node or cable fails.

7. Option (C) is correct.

INFORMATICS PRACTICES

Explanation: The number of computers in Building A are greater than any other building and the distance of building A to buildings S, J and H is comparatively less than the distance between any other buildings. 8. Option (A) is correct. Explanation: A hub is a networking device that have multiple ports used to connect multiple computers in LAN. A switch is a networking device that connects various devices together on a single computer network and may also be used to route information in the form of electronic data sent over networks. 9. Option (D) is correct. Explanation: Radio waves or radio transmission is used for wide area networks and mobile cellular phones. It can cover larger areas and can penetrate through walls, plants, furniture, etc. It is the primary mode of communication and is cheapest of all other modes. 10. Option (D) is correct. Explanation: Broadband refers to the high-capacity transmission technologies that are used to transmit data, voice, and video across long distances at high speeds. Common mediums of transmission include coaxial cable, fiber optic cable, and radio waves.

Course of Action

CHAPTER

6

Max. Time: 1:25 Mins. Max. Questions: 40

SOCIETAL IMPACTS

  Revision Notes: ¾ Digital Footprint: It is a traces or trails of data which the people will leave it on the internet either intentionally or unintentionally. These traces will remain forever. For e.g.: sending emails, filling up of forms etc. There are two types of digital footprint namely: (i) Active Digital Footprint: These are the traces which we leave on the internet intentionally or knowing to the user’s knowledge. For e.g.: sending mails, filling up forms, and providing data in the social media. (ii) Passive Digital Footprint: These are the traces which we leave on the internet without the user’s knowledge. For e.g.: Data is generated through our surfing, visiting a website, and usage of mobile apps. ¾ Net Etiquettes: Net Etiquettes are the rules or guidelines which we need to follow during the use of the internet. There are certain ways which has to be followed: (i) Be Ethical: Sharing of the knowledge on the internet is a good thing which all the persons can access these resources. A person who can share resources have a prior knowledge about the sharing of information. No copyright materials have to be posted or used in any of the platforms. (ii) Be Respectful: We should respect the privacy of the people in individual as well as in group also. Each and everyone have certain privacy rights. Hence, we need to respect all and not share their personal information with some other third parties without their consent. (iii) Be Responsible: Avoid all type of cybercrime activity. We should not impersonate or degrade any of the people in the internet. We should not hurt others through our content. We should be responsible for our content which we post in the social media. ¾ Communication Etiquettes: Internet, computers are mainly used for communication purposes. This communication can take place in any form such as messaging, email sending, and sharing images or videos. This communication has a set of guidelines to be followed: (i) Be Precise: We should send messages in a short and descriptive manner. We should not waste other people’s timing by sending unwanted messages or large paragraphs. (ii) Be Polite: We should be polite in our communication. We should wait until they reply and also, we should not hurt anyone if they did not agree to our point.

(iii) Be Credible: We should be cautious while making comments to the post or replying to the email. We should not judge a person based on their previous comments in the post. ¾ Social Media Etiquettes: These were the guidelines which we have to follow in our social media. (i) Be Secure: Create a strong password for our account, not to post sensitive data on the account, not to respond to the unwanted person or suspicious links. (ii) Be Reliable: Think Twice before uploading a post or story or comments in the social media platform. ¾ Data Protection: In this digital age, everything is data only. All the data has been shared in the online only. Data which cause harm to the user are called as sensitive data. Sensitive data includes text, images, name, mobile number, mail id, credit card details, etc. Protection of these sensitive data is called as Data Protection. Each and every country have laid out certain rules or laws to process, stores or modify these sensitive data. This ensures the protection of data. ¾ Intellectual Property Rights (IPR): Intellectual Property refers to the creation of new ideas, logos, designs, names, brands, etc. The owners who have created it newly were given the full rights to enjoy their privileges are called as Intellectual Property Rights. These rights were protected Scan to know through. more about

this topic (i) Copyright: It grants legal rights to the owners who have created the new items. These copyrights can be awarded to any field such as dancing, music, artworks, education, Intellectual cooking, etc. These rights were provided to Property the original creators or authors only. The Rights creators or authors have the entire rights to access, modify or distribute the content to the public.

(ii) Patent: Patent is also similar to copyright. The major difference is that, initially the inventor has to file for patent rights. After getting the patent rights only, the user has the full rights to access it. This is purely for inventions. This right encourages the scientist to invent something new. Patent rights can protect the invention for 20 years. (iii) Trademark: Trademark is the original work of the shop owners. This is mainly used to create logos, slogans, brand names, designs. Once a Trademark is awarded to a shop owner, other cannot use that. For e.g.: Bata is a brand name which can be used by the Bata Owner’s alone.

Netiquette

Data life cycle Management

First Level

Second Level



Trace the Mind Map



Data Protection

Third Level

It is the standard moral laws and ethics to communicate over Internet. Netiquettes help in making good digital footprints of yours activities over internet.

Information life cycle Management

It is the process of securing important information from intruders, hackers and avoid for concealling corruption, compromise or mis-use of data.



er Safet yb

Active digital footprints can be stored in many ways depending on the situation like surf, history history watch etc.

Digital Footprint

Define

Passive digital footprints can be stored in many ways e.g., cookies, apps etc.

It is the information about a particular person that exists on the Internet as a result of their online activity It is useful for tracing history of some user

Cyber safety are the acts all about the responsible and safe use of Internet.

46 Oswaal CUET (UG) Chapterwise Question Bank INFORMATICS PRACTICES

y

C

SOCIETAL IMPACTS

47

Netiquette

Data life cycle Management

First Level

Second Level



Trace the Mind Map



Data Protection

Third Level

It is the standard moral laws and ethics to communicate over Internet. Netiquettes help in making good digital footprints of yours activities over internet.

Information life cycle Management

It is the process of securing important information from intruders, hackers and avoid for concealling corruption, compromise or mis-use of data.



er Safet yb

Active digital footprints can be stored in many ways depending on the situation like surf, history history watch etc.

Digital Footprint

Define

Passive digital footprints can be stored in many ways e.g., cookies, apps etc.

It is the information about a particular person that exists on the Internet as a result of their online activity It is useful for tracing history of some user

Cyber safety are the acts all about the responsible and safe use of Internet.

48 Oswaal CUET (UG) Chapterwise Question Bank INFORMATICS PRACTICES

y

C

49

SOCIETAL IMPACTS

¾ Violation of Intellectual Property Rights (IPR):

to the software.

(i) Plagiarism: Presenting someone’s work as our own work is called as plagiarism. It is a serious issue and is considered a fraud activity. For e.g.: A person who steals his/her friend’s project presentation and presented it as his/her own idea is called as plagiarism. If a person uses some other person’s content or idea then he/she has to explicitly mention the source of the project in order to avoid plagiarism.

¾ Cyber Crime: Cyber Crime is a crime activity which involves computer and network. Theft of sensitive data, threatens the people using their personal information, stealing of money from their online banking services, etc. are the examples of cybercrimes.

(ii) Copyright Infringement: When a person uses some other person’s work without getting prior permission or not paying amount to them is called as a violation of copyrights. The violation of copyrights is called as copyright infringement. (iii) Trademark Infringement: Unauthorized use of someone’s brand name or logo or slogan or design is a violation of trademark. This is called as trademark infringement. The concerned shop owner has all the rights to conduct cases legally among the shop owners who have used his/her trademark. ¾ Plagiarism { It is the act of copying or impersonating someone’s work as our own one. There are several types of plagiarism. Among them, the 4 major types of plagiarism are

(i) Direct Plagiarism: Act of copying some other works word by word or leaving one or two words and make it as a new one without mentioning the proper source is called as Direct Plagiarism. (For e.g.: Using images from google). (ii) Self Plagiarism: It is also called as Duplicate Plagiarism. The author or the creator of the work itself replicates their work is called as Self Plagiarism. This replication can be either full work or part of the work. (For e.g.: Copying the last month assignment and submit it in this month also). (iii) Mosaic Plagiarism: The writer might change the words or alter the sentence but the concept or the main idea never gets changed is called as Mosaic Plagiarism. It is also called as Patchwork. (For e.g.: Deleting a few words from essay and make it as a new one). (iv) Accidental Plagiarism: Some persons unknowingly might do the plagiarism is called as Accidental Plagiarism. (For e.g.: Forgot to mention the source or to mention the references). ¾ Licensing: It is similar to copyright. The license is a contract or agreement signed between the user and the creator of the product. This agreement contains all the details such as who can download the product, who can access the product and the rights granted to the use of the product. If a person downloads a software from the internet, and does not follow the guidelines of the license then they may be considered as violation of IPR. ¾ Types of Software License: (i) Proprietary license (ii) GNU General Public License (GPL) (iii) End User License Agreement (EULA) (iv) Creative Commons (CC) license: Scan to know ¾ Free and Open-Source Software more about this topic (FOSS): Open-Source software is a free and easy access software without getting permission from the creators. This allows the user to access their source code and also Cybercrime modify the source code or add extra features

¾ Cyber Law: It is any law that applies to the Internet and Internet related technologies. Cyber law is one of the newest areas of the legal system. This is because Internet technology develops at such a rapid pace. Cyber law provides legal protections to people using the Internet. This includes both businesses and everyday citizens. Understanding cyber law is of the utmost importance to anyone who uses the Internet. Cyber law has also been referred to as the “law of the Internet”. The cybercrime activities are: (i) Hacking: Hacking is the unauthorized activity which gains access to the other people system without their consent. They can use expert hardware and software to perform this hacking activity. The Hacking can be classified as ƒ Ethical Hacking: A Person who hacks the other user’s system in a legally approved manner or in an ethical way. The skilled technicians are appointed in the government or company to hack the system in order to prevent cybercrime. These hackers are also called as White Hat hackers. ƒ Non- Ethical Hacking: A person who hacks the other user system intentionally are called as non-ethical hackers. They hack the system for the entertainment purpose or in order to degrade a person’s image or to steal their data and put them at a risk. These hackers are also called as Black Hat Hackers. (ii) Phishing: Phishing is a type of cybercrime which impersonates or creates a fake site as an original one and catches the user information completely and get access to those data. Mainly the Phishing happens in the email. They create a masked or forged email id and then collects the user information especially they focus on banking user name, password etc. A Person has to check the mail id or URL completely before submitting their personal data. (iii) Cyberbullying: It is the cybercrime which will happen mostly on the social media. Creates a fake account on some other profile and impersonate like them, harass or threatens them by posting unwanted comments in their account. ¾ Information Technology (IT) Act 2000: This act was amended in the year 2008. This act describes certain guidelines and rules to the citizens on sharing, storing or processing their data. Now days many cybercrimes are reported and in huge numbers. Hence in order to avoid these crimes, the government had furnished these rules to protect the user’s data. They gave rights to do online transactions on the authorized sites alone. Each of the site is provided with a digital certificate in order to ensure security. ¾ Preventing Cybercrime: The steps which have to be followed regularly in order to avoid or prevent cybercrimes: (i) Take regular backups of our work (ii) Install antivirus and update it regularly (iii) Use only the authorized websites (iv) Do not respond to unwanted links or ads

50 Oswaal CUET (UG) Chapterwise Question Bank (v) Uses Strong Password (For e.g.: a strong password should be Aagdjj$$1983) (vi) A strong password is a combination of Capital letters, small letters, special characters and numbers. The length of the password should be 8 to 13 characters. (vii) Do not use your user’s name or Date of Birth as your password (viii) Do not use the same password for all websites (ix) If you use some other system or in some other places like browsing center. You do not need to autosave your passwords. Off the auto fill or auto save option in Scan to know more about the browser. ¾ E-Waste: Electronic waste is generally called as E-Waste. The electronic gadgets or products which were not used for a long time are called as electronic wastes. For e.g.: Not used computers, keyboard, mouse etc.

this topic

E-Waste

¾ Impact of E-waste on environment: E-waste creates a greater impact on the environment. The emission of gases, and disposal of solid e-waste materials degrades our environment. This waste has to be disposed very carefully. If they failed to dispose it properly, the materials inside the electronic boards cause air pollution, water pollution and soil pollution. The environment itself gets polluted completely with these E-Waste. ¾ Impact of E-waste on humans: All the electronic devices are made up of metals such as lead, beryllium, etc. which cause carcinogenic effects to the people. Cancer, skin disease, failure of kidneys, neurological problems, damages the whole immune

INFORMATICS PRACTICES

system are the problems associated with the improper disposal of the E-waste. These metals get dissolved in the water or food gets contaminated and creates a disease in the human body. ¾ E-Waste Management Act (i) Environmental Protection Act (1986) has been amended which says that “Polluter pays Principle”. This means the person who creates a damage to the environment using the e-waste has to pay the fine amount. (ii) The Central Pollution Control Board (CPCB) has issued a set of guidelines to monitor and dispose the e-waste. ¾ E-Waste Management (i) Reduce: The major concern of reducing the waste is not creating the waste. We need to buy the products based upon our requirements only. Not to buy more than our needs. (ii) Reuse: Instead of buying new goods every time, we have to utilize the old ones by modifying some things. (iii) Recycle: Converting the waste into some other device and use it again e.g.: cell phones, television (Their parts were extracted, recycled and use it again). ¾ Impact on Health (i) Usage of internet or system over a long time creates a back pain, straining of eyes, and also mental and physical pressure. (ii) Ergonomics, a branch of science which deals with the furniture and the arrangement of workplaces. If a person who wants to work for more time in the system, can take the help of an ergonomist to arrange the workplace according to the vision, sitting posture etc. This will help people to get rid of their health conditions.

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. Which is the correct expanded form of FOSS ?  (A) First Open-Source Software (B) Free and Open-Source Software (C) Fine and Open-Source Services (D) Free and Open-Source Services

[CUET 2023]

2. Match the List I with List II

[CUET 2022]

List-I

List-II

A

E-Waste I

B

Reduce

II

C

Reuse

III Conversion of devices into something to use it again and again

D

Recycle

IV

Minimize the purchase according to need only Devices that are no longer in use

Process of reusing the waste after modification

Choose the correct answer from the options given below: (A) A-III, B-II, C-I, D-IV (B) A-II, B-I, C-III, D-IV (C) A-II, B-I, C-IV, D-III (D) A-III, B-II, C-IV, D-I

3. Bad Posture, backaches, neck and shoulder pain can be prevented by arranging the workspace as recommended by  [CUET 2022] (A) Doctor (B) Therapist (C) Ergonomists (D) Psychiatrist 4. Identify the incorrect pairs related to etiquettes in digital society. [CUET 2022] (A) Net etiquettes- Be Ethical, Be Respectful, Be Responsible. (B) Communication etiquettes- Be Precise, Be Polite, Be credible (C) Digital etiquettes- Be Kind, Be considerate. (D) Social media etiquettes- Be Secure, Be Reliable. 5. An ----------------- is a person who deliberately sows discord on the internet by starting quarrels or upsetting people, by posting inflammatory or off topic messages in an online community, just for amusement. [CUET 2022] (A) Internet addict (B) Internet troll (C) Netizen (D) Digital Citizen 6. Writing emails or responses or posts we make on different websites or mobile apps is part of [CUET 2022] (A) Digital Citizen (B) Passive Digital Footprint. (C) Active Digital Footprint. (D) Digital Social Circle.

51

SOCIETAL IMPACTS

7. What is an example of e-waste? (A) A ripened mango (B) Unused old shoes (C) Unused old computers (D) Empty cola cans 8. Legal term to describe the rights of a creator of original creative or artistic work is: (A) Copyright (B) Copyleft (C) GPL (D) FOSS 9. The trail of data we leave behind when we visit any website (or use any online application or portal) to fill-in data or perform any transaction. (A) Offline phishing (B) Offline footprint (C) Digital footprint (D) Digital phishing 10. Intellectual property is legally protected by: (A) copyright (B) patents (C) trademarks (D) All of these 11. The following cannot be exploited by assigning or by licensing the rights to others. (A) Patents (B) Designs (C) Trademark (D) All of these 12. Which of the following is not ‘open source’ software? (A) Linux (B) Ubuntu (C) Open office (D) windows 10 13. E-waste is becoming one of the fastest growing environmental hazards in the world today. If it is not properly treated or disposed of it can cause serious health hazards, therefore, the has issued a formal set of guidelines for proper handling and disposal of e-waste. (A) Central Pollution Control Board (CPCB) (B) Department of Information Technology (DIT) (C) Waste Electrical and Electronic Equipment (WEEE) (D) Information Communication Technology (ICT) 14. What is/are the component of IT Act 2000? (A) Legal Recognition to Digital Signatures (B) Regulation of Certification Authorities (C) Digital Certificates (D) All the above 15. Which of the following is not a violation of IPR? (A) Plagiarism (B) Copyright Infringement (C) Patent (D) Trademark Infringement 16. Abdul deleted all his chats from all his social media accounts, and he thinks that all his traces have been deleted completely. Is he right in thinking so? (A) Yes (B) No (C) May be (D) Not sure 17. Saharsh is a student of class -9 and he is a very frequent user of Internet applications. One day he got an unpleasant message on his instant messenger. What do you think he should do? (A) ignore it and start chatting to someone else. (B) reply back to them and find out what their problem is. (C) shut down the computer and hope they’ll leave him alone in future (D) go to his parents, teacher, or other trusted adult and let them know that he feels uncomfortable.

18. EULA stands for _____________: (A) End User Leave Agreement (B) End User License Aim (C) End User License Agreement (D) None of the above 19. GPL stands for ___________: (A) General Public License (B) GNU General Private License (C) GNU General Public License (D) GNU Public License 20. In this era of digital society, we can do (A) Online Shopping (B) Online Banking (C) Online Education (D) All of these (B) ASSERTION REASON QUESTIONS Directions: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. (A) Both A and R are true and R is the correct explanation for A. (B) Both A and R are true and R is not correct explanation for A. (C) A is true but R is false. (D) A is false but R is true. 1. Assertion (A): The electronic records available on Digi Lockers are considered legitimate. Reason (R): The electronic records available on Digi Locker or mParivahan are deemed to be legally recognised at par with the original documents as per the provisions of the Information Technology Act, 2000. 2. Assertion (A): Cyber law is one of the newest areas of the legal system Reason (R): This is because Internet technology develops at such a rapid pace. 3. Assertion (A): Stealing money from someone’s wallet is a type of cybercrime. Reason (R): Cybercrime is a crime that involves a computer and a network. 4. Assertion (A): Amit has stolen the content of a research paper and published it online. Amit has performed cybercrime. Reason (R): Plagiarism is the act of stealing someone’s work and presenting it as one’s own work. 5. Assertion (A): The source code of Weka software can be modified and shared as it’s an open-source data mining software. Reason (R): Open-source software is computer software that is released under a license in which the copyright holder grants users the rights to use, study change and distribute the software and its source code. 6. Assertion (A): According to research conducted by Symantec, nearly 8 out of 10 individuals are subject to the different types of cyber bullying in India. Reason (R): Don’t give or post any personal information like your name, address of the school/office / home, phone numbers, age, sex, credit card details etc. 7. Assertion (A): The digital footprint is created automatically when you work on internet and providing data in any form.

52 Oswaal CUET (UG) Chapterwise Question Bank

Reason (R): The active digital footprint is created unintentionally without the user’s consent.

8. Assertion (A): Ethical Hackers are called as White Hackers.

Reason (R): Hackers who can hack the system ethically with the legal approval from the government, office or company are called as ethical hackers.

9. Assertion (A): Ergonomics is a study which deals with the proper arrangement of workspaces which includes furniture arrangement.

Reason (R): People will become addicted to the internet when they use internet for more time.

INFORMATICS PRACTICES

4. Smridh needs to protect his personal information or data from unintentional and intentional attacks and disclosure which is termed as ………... (A) Digital right (B) Copyright (C) Privacy (D) Intellectual property 5. The act of fraudulently acquiring someone’s personal and private information, such as online account names, login information and passwords is called as …………… (A) Phishing (B) Fraud (C) Scam (D) Plagiarism II. Read the following text and answer the questions that follow: (Q6-Q10)

I. Read the following text and answer the questions that follow: (Q1-Q5)

The school offers Wi-Fi to the students of Class XII. For communication, the network security-staff of the school is having a registered URL “schoolwifi.edu”. On 17th September 2017, emails were received by all the students regarding expiry of their passwords. Instructions were also given to renew their password within 24 hours by clicking on particular URL provided.





On the basis of the above case study, answer the questions given below:

6. Specify which type of Cyber Crime is it? (A) Spamming (B) Phishing (C) Identity Theft (D) Hacking

10. Assertion (A): Copyright Infringement is a violation of Intellectual Property Rights.

Reason (R): Copyright Infringement is the usage of some other person’s work without the permission of the owner.

[C] CASE BASED QUESTIONS

Smridh has recently changed his school so he is not aware of the people, but someone is posting negative, demeaning comments on his social media profile. He is also getting repeated mails from unknown people. Every time he goes online, he finds someone chasing him online.

1. Smridh is a victim of __________ (A) Eavesdropping (B) Stolen identity (C) Phishing (D) Cyber stalking 2. The action that Smridh should take (A) He should ONLY share with his friends (B) He should NOT share with anyone as it can cause serious problem (C) He should immediately report to the police (D) He should bring to the notice of his parents and school authorities 3. __________ is a set of moral principles that governs the behaviour of a group of individuals and regulates the use of computers. (A) Copyright (B) Computer ethics (C) Property rights (D) Privacy law

7. URL stands for _________: (A) Universal Resource Loader (B) Universal Resource Locator (C) Unite Research Loader (D) Uniform Resource Locator 8. Unsolicited commercial email is known as: (A) Malware (B) Virus (C) Spam (D) Spyware 9. Wi-Fi stands for __________: (A) Wireless Internet Frequent Interface (B) Wireless Functioning (C) Wireless Fidelity (D) Wireless Free Internet 10. Ideally, what characters should be used in a password to make it strong? (A) Letters and numbers only (B) Mixed Case (Upper and Lower) (C) Special characters (D) All of above

ANSWER KEY

[A] MULTIPLE CHOICE QUESTIONS 1. (B)

2. (C)

3. (C)

4. (C)

5. (B)

6. (C)

7. (C)

8. (A)

9. (C)

10. (D)

11. (C)

12. (D)

13. (A)

14. (D)

15. (C)

16. (B)

17. (D)

18. (C)

19. (A)

20. (D)

8. (A)

9. (B)

10. (A)

8. (C)

9. (C)

10. (D)

[B] ASSERTION REASON QUESTIONS 1. (A)

2. (A)

3. (D)

4. (D)

5. (A)

6. (B)

7. (C)

[C] CASE BASED QUESTIONS 1. (D)

2. (D)

3. (B)

4. (C)

5. (A)

6. (A)

7. (D)

53

SOCIETAL IMPACTS

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS

9. Option (C) is correct.

1. Option (B) is correct.

Explanation: Digital footprint means the traces of our data which we leave in the internet either intentionally or unintentionally. For e.g.: Submitting a form with our data, browsing history, surfing, chatting, post in social media etc.

Explanation: Free and Open Source Software (FOSS) has a large community of users and developer who are contributing continuously towards adding new features or improving the existing features. 2. Option (C) is correct. Explanation: E-waste – Electronic device that are not used for a longer time (e.g.: computer, keyboard, mouse, inner parts of computer) Reduce – The major concern of reducing the waste is not creating the waste. We need to buy the products based upon our requirements only. Not to buy more than our needs. Reuse – Instead of buying new goods every time, we have to utilize the old ones buy modifying some things. Recycle- Converting the waste into some other device and use it again e.g.: cell phones, television (Their parts were extracted, recycled and use it again). 3. Option (C) is correct. Explanation: Ergonomists is a person who deals with the study of arrangement of furniture which will protect us from pains, injury during the working times. 4. Option (C) is correct. Explanation: Digital etiquette is defined as rules of behavior while using the digital technology such as sending mails, chatting with others, working, surfing etc. This includes all the etiquettes. Hence this pair is incorrect. 5. Option (B) is correct. Explanation: Internet troll is a way for directly attacking the people either by commenting under their post wrongly. Creating memes about them and post it on social media. These activities upset the people or create a quarrel between the people. 6. Option (C) is correct. Explanation: Active digital footprint means the data which we submit on our own intentionally. For e.g.: filling forms, sending emails, put a like to the post, sharing a post etc. 7. Option (C) is correct. Explanation: E-Waste means electronic waste. Electronic things or parts which is not used for long period are considered as E-waste. Hence Unused old computers are E-waste 8. Option (A) is correct. Explanation: Copyright is a term which will be given to the creators of the products. This can be given in all of the fields such as software creation, website, application, dancing, singing, art work etc. The person who obtained the copyrights can have all the rights to use the products or modify it or anything. If some other person wants to use the products for modification purpose, they need to get permission from the creators.

10. Option (D) is correct. Explanation: Intellectual property means the creator or owner of the product or application or anything can earn recognition or reward or financial benefits. This can be achieved through copyright or patents or trademarks. Based upon the invention the person can acquire any one of these three intellectual properties. 11. Option (C) is correct. Explanation: Trademark is a brand name or logo or slogan which can be given to promote the particular company or their brands. This is to be used by the particular owners alone. Every company should have a separate brand name, logo or slogan. The same trademark cannot be used by two companies. For e.g.: Addidas is a shoe company, this company alone uses this name and their logo. 12. Option (D) is correct. Explanation: Open-Source software the author gave complete rights to the user to view or modify or add extra features to the source code. Windows 10 is a licensed software. We cannot open its source code. Hence it is not an open-source software. 13. Option (A) is correct. Explanation: The CPCB has issued a formal set of guidelines for processing or disposing the e-waste. 14. Option (D) is correct. Explanation: According to the Information Act 2000, a person can use online banking, online shopping etc. and make transactions through it. This transaction is considered to be a legal and authorised one. Digital certificates are authorised with each website to prevent unauthorized attacks. 15. Option (C) is correct. Explanation: Patent is getting rights for his/her invention. It is similar to copyrights, but a person has to file the patent rights first, if it is granted then he can access the full rights. It is an intellectual property right. 16. Option (B) is correct. Explanation: Digital Footprints means the traces or trails of data that we leave on the internet. Hence, if Abdul even deleted his chats from the social media accounts, still his traces are available forever. 17. Option (D) is correct. Explanation: As a student, Saharsh has to inform his parents or teachers or guardians about his issue. They can help him to get out of this problem with a proper solution.

54 Oswaal CUET (UG) Chapterwise Question Bank 18. Option (C) is correct. Explanation: EULA (End User License Agreement) is a legal document which will describes about the user rights and restrictions associated with the software. 19. Option (A) is correct. Explanation: Abbreviation 20. Option (D) is correct. Explanation: This era itself is called as Digital Era. Everything becomes digitalised. A Person can do shopping, banking, ordering foods, education, playing games etc.

[B] ASSERTION REASON QUESTIONS 1. Option (A) is correct. Explanation: According to the Information Technology Act 2000 amended in 2008, the government have the entire rights to store, process the sensitive information of the user with their consent. The data such as personal information, vehicle information etc. Hence Reason is the correct explanation for the assertion. 2. Option (A) is correct. Explanation: Cyber Law is any law that applies to the Internet and Internet related technologies. Cyber law is one of the newest areas of the legal system. This is because Internet technology develops at such a rapid pace. Cyber law provides legal protections to people using the Internet. 3. Option (D) is correct. Explanation: Stealing money from someone is a normal criminal activity. Cybercrime is a crime which will happen in the digital or online network. Hence the assertion is wrong and the reason is correct. 4. Option (D) is correct. Explanation: Plagiarism is the act of stealing some other person’s work and impersonate it as their own work. It is a violation of Intellectual Property Rights. So, it is not a cybercrime. Hence the assertion is wrong and the reason is correct. 5. Option (A) is correct. Explanation: Open-source software is a software which the user can use it or modify it without getting the permission from the owners or creators. Weka Software is a kind of an opensource software. Hence the reason is the correct explanation of assertion. 6. Option (B) is correct. Explanation: Cyberbullying means the act of threatening people through social media or messages or call with the help of the details collected from their social media. We should not post our sensitive information on the social media which will create issues to us sometimes. Hence both the statements are correct, but reason is not the correct explanation for the assertion. 7. Option (C) is correct. Explanation: Digital footprint is the traces of that we created unintentionally or intentionally on the internet. Active digital

INFORMATICS PRACTICES

footprint means the data which we created intentionally such as submitting a data, filling a form etc. Hence the assertion is correct and the reason is wrong. 8. Option (A) is correct. Explanation: Hackers who hack the system with the legal approval are called as ethical hackers or white hat hackers. Hence reason is the correct explanation of assertion. 9. Option (B) is correct. Explanation: Both the statements are correct but the reason does not explain about the needs of ergonomics. Hence the reason is not the correct explanation for assertion. 10. Option (A) is correct. Explanation: Both the statements are correct and the reason is the correct explanation of the assertion.

[C] CASE BASED QUESTIONS 1. Option (D) is correct. Explanation: Cyberstalking is a type of cybercrime. It attacks the people intentionally. The attacker threatens the people either by mailing them or post negative comments in a social media or create a fake account and impersonate like the owner. 2. Option (D) is correct. Explanation: As a student, he has to immediately report this to his parents and school teachers. Then only they can guide him to get out of this problem. 3. Option (B) is correct. Explanation: Computer Ethics is a set of principles that has to be followed while using the computer and the internet. For e.g.: Net etiquettes, communication etiquettes, privacy policies etc. 4. Option (C) is correct. Explanation: Data privacy is the protection of our own data. It defines who can access our data and up to what extent he/ she can share his/her own personal information. For e.g.: If a person opens a Facebook account, he/she can decide whether the visibility should be public or private. 5. Option (A) is correct. Explanation: Phishing is a type of cybercrime. It creates a fake website as original one and collects the user sensitive information such as credit card details, user id, password etc. Phishing will mostly happen in the Email. 6. Option (A) is correct. Explanation: Phishing is a type of cybercrime. It sends bulk of emails to all persons in order to collect their sensitive information such as user id or passwords. It creates a fake mail id which was looks like an original one and collects the information. 7. Option (D) is correct. Explanation: Abbreviation. 8. Option (C) is correct. Explanation: Spam is also a called as a junk mail. It was sent to large number of people in bulk and this mail contains advertisement or link for malwares. If people respond to this mail the attackers get access to the user system.

55

SOCIETAL IMPACTS

9. Option (C) is correct. Explanation: Abbreviation. 10. Option (D) is correct. Explanation: A strong password should be created in order to protect our data from attackers or hackers. A strong password

should have • Uppercase and lowercase letters • Special Characters • Numbers • Not to use our user’s name as a password

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

7

DATA COMMUNICATION

  Revision Notes ¾ Data: Data refers to any entity such as text, image, audio, video etc. ¾ Communication: Communication means sending and receiving messages between two or more people. This message can be in any form of data. ¾ Data Communication: Data Communication means sending or receiving messages between two or more devices through a network. The device involved in this communication is capable of receiving and sending messages. E.g.: Telephone, Mobile, Laptop, Pen drive, Mail ¾ Types of Data Communication: The Data communication was broadly classified into three types namely: (i) Simplex Communication: It is a unidirectional or one-way communication. One device sends only the messages whereas the other devices receive them. For e.g.: Television Remote, where the remote can send signals to the TV. Based upon the signals the TV will work. But the TV cannot send anything back to the remote. Here TV is the receiver, Remote is the sender.

Scan to know more about this topic

Simplex, Half Duplex, Full Duplex

(ii) Half-Duplex Communication: It is a bi-directional way of communication. It involves both the sender and receiver can send and receive messages. The limitation of this communication is either any one of the persons alone can send messages and other person has to wait for his/her turn. For e.g.: Walkie-Talkie. Walkie-Talkie is generally used by the police patrol; one can talk and other had to hear. Both of the persons cannot able to speak at same time. (iii) Full-Duplex Communication: It is fully-Bi-directional communication. Both the sender and receiver can send or receive messages at the same time. For e.g.: Telephone, Mobile Phone, WhatsApp, Messenger etc. ¾ Switching Techniques: Switching techniques were evolved in order to connect large number of devices at an affordable rate. This switch provides a temporary route for data transmission, where the data is routed through different network nodes. The switching technique can be of three types: (i) Circuit Switching: It creates a dedicated path between the sender and the receiver. All the packets involved in this transmission follows the same path. For e.g.: Telephone Line.

(ii) Packet Switching: It breaks the messages into small packets and check the availability of the channels and starts to transmit. Packet consists of two parts namely Header and a message. All the packets were reassembled at the receiver side and then gets delivered to the receiver. Like Circuit switching, it does not have a dedicated channel rather it uses the channel which is available at the transmission time. So, any packets can go through any channels. (iii) Message Switching: It is a switching technique in which a message is transferred as a complete unit and routed through intermediate nodes at which it is stored and forwarded. In Message Switching technique, there is no establishment of a dedicated path between the sender and receiver. Each and every node stores the entire message and then forwards it to the next Scan to know node. This type of network is known as store more about this topic and forwards network. ¾ Communication Media: Wired-Transmission Media: Any Physical form of link that transmits the messages is called as wired-transmission media. Types of Wired Technologies. It is of 4 types namely:

Communication Channels

(i) Twisted Pair Cable: This cable is made up of two copper wires in a twisted pattern and this twisted pattern cable wire is insulated with plastic covers. Several twisted pairs were made and kept it in a protective shield. Each pair act as a single transmission link. This twisted pair appearance minimises the electrical interferences. These cables were mainly used in the telephone line or Local Area Network (LAN). (ii) Co-axial Cable: The Co-axial cable is better shielded and have a high transmission rate than the Twisted pair cable. It has a copper wire which is surrounded by insulating material. This insulating material is again surrounded by copper mesh which is bounded with plastic cover. This design carries the data quickly without any environmental factors. These cables carry a higher frequency data to longer distances. (iii) Ethernet Cable: It is a cable used to connect devices together in a network to transfer the data. It connects PC or Desktop or Laptop to a router or modem or printer or scanner. It made all the wired peripherals together in a same network. Shielded and straight-over ethernet cables were used most commonly to connect device. Shielded cables were mostly used in order to avoid electrical noise. (iv) Optical Fiber: It carries the data in the form of light through a thin fibre glass. It uses refraction concept to travel

E.g.: Wallcie-Telephone

Bidirectional

Half Duplex

E.g.: Television

Unidirectional

Simplex

Full Duplex Bidirectional occurs simultaneously E.g.: Telephone

Types of Data Communication

What Data Communication? Data communication refer to tie exchange of data such as image, audio, text etc. to other device through a medium.

Network Protocol

a

mu Com nica

Communication Media

Da t

Examples of Protocol HTTP, FTP, IP, PPP, SMTP, POP3 and IMAP etc.

Wired Technologies * Twisted Pair Cable * Co-axial Cable * Ethernet Cable * Optical Fibre

First Level

Second Level

Trace the Mind Map Third Level

Packet Switiching Provides a multiple link base upon the traffic the path will be selected.

Message Switching In Message Switching technique, there is no establishment of a dedicated path between the sender and receiver.

Data transfer Rate • Number of bits transmitted in a second • Measured in bits per seconds (bps) • Mbps, Gbps, Tbps

Bandwidth • Maximum number of signals passed through channels • Measured in Hertz (Hz) • KHz, MHz, Ghz, THz

Circuit Switiching Provides a dedicated link between two devices

Switiching Techniques

Types of Data • Text • Image • Audio • Vedio • Number



Wireless Technologies * Bluetooth * WLAN * Infrared * Microwave



n tio



Network Protocol: It is a set of rules that should be followed by the sender, receivers and the intermediate devices in a computer network to communicate with each other.

DATA COMMUNICATION

57

58 Oswaal CUET (UG) Chapterwise Question Bank through the glass. These cables were very light and can have higher and faster transmission rate. It covers a large distance also. This has a higher and faster transmission rate compare to all the cables. The limitation of this cable is, it requires two cables for full-duplex communication and also it is expensive compared to the other cables. ¾ Mobile Telecommunication Technology: Now days, mobile phones are the most used gadgets. Mobile Phone with the internet is the handiest thing for all the people. This mobile phone technology evolved under five different generations namely: (i) 1G: It came around in 1982. This was used to transmit voice calls. These calls were transmitted through analog signals between the sender and the receiver. (ii) 2G: It came around in 1991. This uses digital signals to carry the voice calls. Along with the voice calls, Multimedia Messaging Service (MMS) and Short Messaging Service (SMS) were added and the security features were improved. (iii) 3G: It came around in 2001. This is similar to 2nd generation. 3G data services were added as a feature in this generation. This generation has a higher data rate transmission. (iv) 4G: Demand for network was increased, Hence the 3G network was changed into 4G. This uses all the features such as voice calls, video calls, messaging service, broadband, browsing etc. The technology 4G is entirely different from 3G. (v) 5G: Now the 5G is evolving. It has a higher data transfer rate compared to the 4G. It has an additional feature such as connecting devices either wired or wireless, transferring data in both the forms such as wired or wireless. ¾ Wireless Technology: It uses electromagnetic signals to transfer data. This technology covers two or more devices, short to long distances without any physical connection. The wireless technology classified into several types based on their coverage range. The types of wireless technology are: (i) Bluetooth: Bluetooth technology covers a short distance. It uses 2.4GHz to transmit and receive data. It sends the data within 10mts at a speed of 1-2Mbps.The devices within this 10mts distance forms a network called Piconet. This piconet network uses a master-slave configuration. Bluetooth technology was used in mobile phones, speakers, keyboard, mouse etc. to transfer data. (ii) WLAN: Wireless Local Area Network (WLAN) technology is used to provide network access to a building or an organisation or a company. It uses an Access Point (AP) which provides network access to all the mobile or laptop or network device within a building or organisation. The Access Point is connected to the hub or router presented in the building. WLAN is an easy and effective access of network in public places. (iii) Infrared: It is a very high frequency electromagnetic waves ranging from 300GHz-400THz. It is used for short distance and point to point communication such as mobile to mobile, mobile to printer etc.

INFORMATICS PRACTICES

(iv) Microwave: It uses electromagnetic waves ranging from 1GHz to 300GHz. It is used in point-to-point communication as well as unidirectional communication such as radar or satellite.

Scan to know more about this topic

¾ Network Protocol: It is a set of rules that should be followed by the sender, receivers and the intermediate devices in a computer network to communicate with each other.

Network Protocols

¾ Need for Protocol (i) Flow control Protocol: This protocol is needed when sender and receiver have different flow rates or transmission rates. (ii) Access Control: It decides which packet currently access the data and the nodes. If this is not under the control then the data packets will get collide with each other. (iii) Identify networks on the computer. (iv) Identify the form of the data which needs to be converted while sending and receiving the data. (v) Ensure the delivery of the sender and receiver packets without any data loss. ¾ HTTP: Hyper Text Transfer Protocol(HTTP) gets evolved with the collaboration of Internet Engineering Task Force (IETF) and World Wide Web Consortium (W3C) in the year 1989. It is used to load webpage using hyperlink. It works under the request-response concept. The common use of the HTTP is between web browser (client) and web server (server). It is also called as client-server model. The client requests a particular webpage in the form of URL or hyperlink and then the HTTP server loads the request and provides the response in the form of webpage or website. It uses the port number 80 to transfer the data. ¾ FTP: File Transfer Protocol(FTP) is used for transferring files between two devices. It also works under the concept of request-response model or client-server model. The user requests file from one device optionally it authenticates the file or else it transfers the file from another device. It uses two port numbers 20 and 21. Port no. 20 is assigned for Data port and port no. 21 is assigned for controller port. FTP is the simplest one transfer which can take care of the issues automatically such as: { Naming

Convention in files

{ Representation { Follows

of different forms of data

different directory structure

¾ IP: Internet Protocol (IP) is a standardized protocol. It is also works on the request-response or client-server model. It ensures that each node or system is assigned with a valid IP address. The data is converted into small packets and each packet is sent to the destination using this IP address. At the receiver side, all the packets were assembled and then delivered. The IP protocol ensures the data delivery and data integrity. There are many redundant connection paths in this IP. Hence, all the packets can take two different paths to deliver the packets. This path selection is entirely based upon the traffic. All the packets from different paths gets assembled and delivered to the receiver.

59

DATA COMMUNICATION

¾ PPP: Point to Point Protocol (PPP) establishes direct and dedicated connection between two devices. It maintains data integrity in sending and receiving messages. The limitations of the PPP are having less security and do not have proper addressing mechanism. The components involved in the PPP were { Encapsulation { Link

Component

Control Protocol

{ Authentication



called as the capacity of the channel. Channel capacity can be measured using two things namely: ƒ Bandwidth ƒ Data Transfer rate (i) Bandwidth: It is defined as a range of frequencies available for transferring the data through the channel. Bandwidth is measured in Hertz (Hz). ƒ 1Hz

Protocols

For e.g.: Connecting PC to modem in the home.

¾ Electronic Mail Protocol: ¾ SMTP: Simple Mail Transfer Protocol (SMTP) is used for sending mail. SMTP takes the receiver address from the head of the sent mail and delivers it to the destination address. After the delivery of the message, it removes the address from the header. It uses the port 25 to transfer the mail. It uses Post Office Protocol Version 3 (POP3) or Internet Message Access Protocol (IMAP) to save messages in a server mailbox and download them periodically.

= 60 vibrations per minute

ƒ 1 KHz (Kilo Hertz) = 1000Hz (Thousand Hertz) ƒ 1 MHz (Mega Hertz) = 1000000Hz (Million Hertz) (ii) Data Transfer Rate: Data convert into signals while travelling through communication channel. Each signal comprises of many bits. Hence, the data transfer rate is defined as number of bits transmitted between source and the destination for a second. It is measured in terms of Bits per Second (Bps). ƒ 1Kbps (Kilo bits per second) = 1024 bps ƒ 1Mbps (Mega bits per second) = 1024Kbps

Channel: Channel is a transmission medium through which all the data were communicated. The maximum number of signals or network traffic carried throughout a channel is

ƒ 1Gbps (Giga bits per second) = 1024Mbps ƒ 1Tbps (Tera bits per second) = 1024Gbps

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. Which of the following can be handled by a gateway?  [CUET 2023] (A) Protocol conversion

10. Which type of switching uses the dedicated path or link? (A) Circuit Switching (B) Packet Switching (C) Message Switching (D) Circuit

(B) Packet resizing (C) Data encapsulation (D) regeneration of weakened signals 2. Which communication mode allows communication in both the directions simultaneously? [CUET 2022] (A) Simplex

(B) Half Duplex

(C) Full Duplex

(D) Half Simplex

(C) Coaxial cable

11. The Protocol used for transferring files is called (A) FTP

(B) PPP

(C) SMTP

(D) Telnet

12. The word telematics is a combination of: (A) Computer

(B) Telecommunication

(B) Twisted Pair

(C) Informatics

(D) Both (B) and (C)

(D) All of these

13. The commonly used protocol for webpage transfer is:

3. Examples of Guided media are: (A) Optical cable

9. Which wired transmission media has the highest transmission speed in a network? (A) Coaxial Cable (B) Optical Fibre Cable (C) Twisted Pair Cable (D) Ethernet Cable

[CUET 2022]

4. Which of the following uses wired transmission media?

(A) HTTP

(A) Local Telephone system

(B) Mobile Phone

14. In Optical fibre the signal is converted into:

(C) Radar

(D) Satellite

(A) Light

(B) Electromagnetic Waves

5. The internetworking protocol is called as:

(C) Infrared

(D) Radio waves

(A) IP

15. Data can consist of:

(B) PPP

(C) SMTP

(D) FTP

(B) Telnet

(C) FTP

(D) PPP

6. Transfer of bits per second(bps) is called as:

(A) Text

(B) Audio

(A) Bandwidth

(B) Data transfer rate

(C) Images

(D) All of these

(C) Signal

(D) Channel

7. What is the speed of a data transfer in Bluetooth?

16. The link between the Home Tv and the modem is an example of protocol:

(A) 1-2 Mbps (B) 2-4 Mbps (C) 3 Mbps

(A) FTP

(D) 1 Mbps

(B) PPP

(C) SMTP

(D) HTTP

17. Microwave frequency ranges between:

8. The word PPP stands for: (A) Point to Point Protocol

(B) Packet to Packet Protocol

(A) 5GHz to 10THz

(B) 100GHz to 10THz

(C) Point to Packet Protocol

(D) Packet to Point Protocol

(C) 1GHz to 300GHZ

(D) 300GHz to 1THz

60 Oswaal CUET (UG) Chapterwise Question Bank 18. Pick out the feature of 2G mobile technology: (A) Voice calls (B) Voice calls, SMS, Multimedia Message (C) Voice calls, WhatsApp, Facebook (D) SMS 19. SMTP, FTP are applications of which layer in Open System Interconnection (OSI) model? (A) Transport

(B) Data

(C) Application

(D) Network

9. Assertion (A): Twisted pair cable looks like DNA structure. Reason (R): Twisted pair cable is made up of two copper wires twisted together and insulated in a plastic cover. 10. Assertion (A): 3G is a mobile generation came with the feature of networking. Reason (R): 4G technology is differ from 3G technology.

[C] CASE BASED QUESTIONS I. Read the following text and answer the questions that follow: (Q1-Q5)

20. Which wireless technology will be more convenient to access internet in a building? (A) WLAN (B) MAN

(C) WAN

(D) PAN

(B) ASSERTION REASON QUESTIONS Directions: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. (A) Both A and R are true and R is the correct explanation for A. (B) Both A and R are true and R is not correct explanation for A. (C) A is true but R is false. (D) A is false but R is true. 1. Assertion (A): 4G network provides up to 100 Mbps speed to users, far higher than a 3G network. Reason (R): 4G enables users to stream high-definition audio and videos without interruption due to its high speed.  [CUET 2022] 2. Assertion (A): SMTP stands for Simple Mail Transfer Protocol. Reason (R): SMTP is the standard protocol for sending emails across the Internet. 3. Assertion (A): Wired communication media are also known as Guided media and are a type of Transmission media. Reason (R): This type of communication is the most stable which is why it is considered better than wireless. 4. Assertion (A): The data transfer rate (DTR) is the amount of digital data that’s moved from one place to another in a given time. Reason (R): DTR is sometimes also referred to as bandwidth. 5. Assertion (A): When a dedicated path is established for data transmission between sender and receiver, it is called circuit switching. Reason (R): Once path is set up, the only delay is in data transmission speed. 6. Assertion (A): HTTP uses request-response model. Reason (R): HTTP is a protocol which loads webpages based upon the user request. 7. Assertion (A): Bluetooth covers a larger distance. Reason (R): Bluetooth covers a distance of 10mts with a data transfer rate of 1-2 Mbps. 8. Assertion (A): Optical Fibre cable uses light to transfer data. Reason (R): Optical Fibre cable is very expensive.

INFORMATICS PRACTICES



ABC is an administrator of business XYZ. He decided to start business all over India. He wants to establish network connection among all the branches. Help him to choose various communication media as per requirement Head office: Delhi, 50 computers Branch 1: Ahmedabad, 10 computers Branch 2: Chennai, 10 computers Branch 3: Kolkata, 15 computers

1. ABC wants a high network in Branch 1. Which cable can he used? (A) Twisted Pair Cable (B) Coaxial Cable (C) Fiber Optic Cable (D) None of these 2. ABC wants a low budget communication cable. Which cable can he used? (A) Twisted Pair Cable (B) Coaxial Cable (C) Fibre Optic Cable (D) Both (A) and (B) 3. ABC wants to know the wireless communication media within his head office (A) Microwave (B) Infrared (C) Bluetooth (D) WLAN 4. ABC wants to connect his head office to all his branches. What communication link he uses? (A) Satellite Link (B) Radio wave (C) Microwave (D) Radar 5. He wants to connect his monitor with printer. What type of cable he can uses? (A) Ethernet Cable (B) Twisted Pair Cable (C) Fiber Cable (D) None of these II. Read the following text and answer questions that follow: (Q6-Q10)

XYZ wants to connect his Television to his modem. He is unaware of the protocols. Help him to choose the efficient protocol for his needs.

6. What is a protocol? (A) Gateway (B) Hub

(C) Switch

(D) Router

7. Which Protocol is suitable for XYZ needs? (A) PPP (B) FTP (C) SMTP (D) Telnet 8. Which OSI layer does PPP belongs to? (A) Application Layer (B) Data Layer (C) Presentation Layer (D) Session Layer 9. PPP is mainly used in: (A) Home (C) Large Geographical area

(B) Organisation (D) None of these

61

DATA COMMUNICATION

(C) Encapsulate the data (D) Both (A) and (B)

10. Mention the limitation of PPP (A) Security is very less (B) Does not support flow control mechanism

ANSWER KEY

[A] MULTIPLE CHOICE QUESTION 1. (A)

2. (C)

3. (D)

4. (A)

5. (A)

6. (B)

7. (A)

8. (A)

9. (B)

10. (A)

11. (A)

12. (D)

13. (A)

14. (A)

15. (D)

16. (B)

17. (C)

18. (B)

19. (C)

20. (A)

1. (B)

2. (A)

3. (A)

8. (B)

9. (A)

10. (B)

8. (B)

9. (A)

10. (D)

[B] ASSERTION REASON QUESTIONS 4. (C)

5. (A)

6. (A)

7. (D)

[C] CASE BASED QUESTIONS 1. (C)

2. (D)

3. (D)

4. (A)

5. (A)

6. (A)

7. (A)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS

9. Option (B) is correct.

1. Option (A) is correct.

Explanation: Optical fibre cable has the highest transmission speed because it uses the refraction concept to transfer the data in the form of light through a fibre glass medium. Hence, it carries the data faster as well as covers long distance.

Explanation: A Protocol is a gateway or a set of rules for establishing communication between two devices. 2. Option (C) is correct. Explanation: Full Duplex is a mode which allows the communication simultaneously in both directions. e.g.: Telephone 3. Option (D) is correct. Explanation: Guided media means it has a consistent path and a physical cable through which the data will pass. Guided media is also called wired media transmission. 4. Option (A) is correct. Explanation: Wired transmission media means physical cable which connects the sender and receiver to transmit messages in a full-duplex manner. Initially, landlines were connected with twisted-pair cable or coaxial cable. This will cover the longest distance. 5. Option (A) is correct. Explanation: Internet Protocol is called as internetworking protocol. Since this protocol checks whether all the systems are issued with a valid IP address. Through this IP address the message will be sent and received. . 6. Option (B) is correct. Explanation: Transmission of bits per second is called as a Data transfer rate. 7. Option (A) is correct. Explanation: Bluetooth is a wireless technology which covers 10m distance for the data transfer. Within this 10mt distance, the speed of the data transfer is 1-2 Mbps. 8. Option (A) is correct. Explanation: Point - to - Point Protocol (PPP) is a communication protocol of the data link layer that is used to transmit multiprotocol data between two directly connected (point-topoint) computers.

10. Option (A) is correct. Explanation: Circuit switching is a communication channel which connects the sender and receiver through a dedicated or a constant path. The sender and receiver always send the message through this path alone. 11. Option (A) is correct. Explanation: FTP (File Transfer Protocol) is used for transferring files between two devices. 12. Option (D) is correct. Explanation: The word telematics is a combination of telecommunication and informatics which describes the use of communication and Information Technology to send, receive or store messages between devices through the network.) 13. Option (A) is correct. Explanation: HTTP means Hyper Text Transfer Protocol. It uses port no. 80 to load websites through hyperlinks. It works based upon the request-response model. 14. Option (A) is correct. Explanation: Optical fibre cable converts the data into light during transmission. This conversion takes place for transferring the data in a faster way and higher transmission rates. 15. Option (D) is correct. Explanation: Data consist of any entity such as text, audio, images, video etc. 16. Option (B) is correct. Explanation: Point-to-Point Protocol provides a dedicated connection between two devices. It covers a shortest distance.

62 Oswaal CUET (UG) Chapterwise Question Bank

INFORMATICS PRACTICES

17. Option (C) is correct.

7. Option (D) is correct.

Explanation: Microwave frequency ranges between 1GHz to 300GHz.

Explanation: Bluetooth is a wireless technology which covers a very short distance of 10mts. Hence the Assertion is false.

18. Option (B) is correct. Explanation: In 2G, mobile technology has evolved with some features such as messaging service along with voice calls. 19. Option (C) is correct. Explanation: SMTP, FTP are application layer protocols. These protocols were used to transfer data to the client. 20. Option (A) is correct. Explanation: WLAN- Wireless Local Area Network which provides internet access to the entire building through Access Points.

[B] ASSERTION REASON QUESTIONS 1. Option (B) is correct. Explanation: 4G network provides up to 100 Mbps speed to users, far higher than a 3G network. 4G enables users to stream high-definition audio and videos without interruption due to its high speed. It also facilitates wireless broadband that allows the users to access the internet without any need for fixed wired. 2. Option (A) is correct. Explanation: SMTP stands for Simple Mail Transfer Protocol. It is used for sending mails between the sender and receiver through network. 3. Option (A) is correct. Explanation: Wired communication media are also known as Guided media and are a type of transmission media. This type of communication is the most stable which is why it is considered better than wireless. These connections are less prone to other outer interferences. Output will be ‘gram’ 4. Option (C) is correct. Explanation: The data transfer rate (DTR) is the amount of digital data that’s moved from one place to another in a given time. The data transfer rate can be viewed as the speed of travel of a given amount of data from one place to another. The DTR is sometimes also referred as throughput.

8. Option (B) is correct. Explanation: Both the statements were correct with reference to the optical fibre. But the usage of light to transfer the data is not clearly explained in the reason. Hence the reason is not the correct explanation for assertion 9. Option (A) is correct. Explanation: Both the statements were correct. Twisted pair cable is made up of two copper wires twisted together and insulated in a plastic cover. Several cables were combined together and insulated in a shield. This shield looks like DNA structure. Hence the reason is the correct explanation for assertion. 10. Option (B) is correct. Explanation: 3G mobile generation uses network along with the basic features whereas 4G network came with the entirely different generation which makes the mobile phone the handiest one. Hence both the statements were true in their concepts but not the explanation for the assertion.

[C] CASE BASED QUESTIONS 1. Option (C) is correct.

Explanation: Fibre Optic Cable is the fastest transmission medium and also with highest frequency rates. 2. Option (D) is correct. Explanation: Twisted Pair cable and Coaxial cable are at affordable rates compare to optic fibre cable. If he needs higher transmission with lowest price, he prefers coaxial cable or else he prefer twisted pair cable 3. Option (D) is correct. Explanation: WLAN is a wireless communication which connects all the devices within an office through access points. 4. Option (A) is correct. Explanation: Satellite Link is a link which transmits the data a long distance. It uses uplink for sending the signal through station and uses downlink for receiving signals in another station. 5. Option (A) is correct. Explanation: Ethernet cable is used to connect the devices to provide network access.

5. Option (A) is correct.

6. Option (A) is correct.

Explanation: When a dedicated path is established for data transmission between sender and receiver, it is called circuit switching. When any network node wants to send data, be it audio, video, text or any other type of information, a call request signal is sent to the receiver and acknowledged back to ensure availability of dedicated path.

Explanation: Protocol is a set of rules or a gateway which can designed rules for both sender and receiver. This allows the devices to communicate with each other.

6. Option (A) is correct. Explanation: HTTP receives a request from the user in the form of hyperlinks and then its responses back in the form of webpages. Hence, it uses a request-response model. The reason is correct explanation for the assertion.

7. Option (A) is correct. Explanation: PPP is a Point-to-Point Protocol. This protocol enables a communication between two devices with a dedicated link. Hence, to connect TV and modem, he prefers PPP. 8. Option (B) is correct. Explanation: PPP works on Data link layer. Since it acts as a gateway to connect two devices. Through this gateway the data will be transferred.

DATA COMMUNICATION

9. Option (A) is correct. Explanation: PPP Protocol is mainly used for home to connect two routers without any host device. 10. Option (D) is correct.

63 Explanation: PPP protocol does not support flow control mechanism and it connects within home hence, it does not have higher security control or address mechanism.

Course of Action

CHAPTER

Max. Time: 1:25 Mins. Max. Questions: 40

8

  Revision Notes: ¾ Threats and Prevention: Threats are negative actions or events which will cause harm to our system or application. It can either modify or delete the data, affect our files or steal information from our system and use it in an unauthorised way. ¾ Threats can occur in different forms:

SECURITY ASPECTS

Scan to know more about this topic

Virus & Related threats

(i) Virus: Virus (Vital Information Resources under Siege) is a term coined by Fred Cohen in 1985. It is a piece of software code created to destroy the system without the user consent. Once it is injected into the system, it has the capability to self-replicate and destroys the entire system. Some of the common viruses were CryptoLocker, MyDoom, Netsky, Sasser, Slammer etc. Each of the virus is designed with the separate intention. All the viruses did not behave same. (ii) Worms: Worms are similar to the virus. The difference is that worm does not need any host program to activate. It is a standalone program which can enters into the system and gets replicated. Some of the common worms are Storm Worm, Sobig, Msblast, Code Red etc. (iii) Trojan Horse: It is also a malicious software. It looks like a legitimate application, after installing this application this will act as a malicious one. It does not have self-replicating capacity or destroy the files. It just passes the information by opening the email or attaching files to the email. ƒ Spam: Spam is a bulk mail or junk mail. A single message can be sent to the n number of users without the user’s consent. This mail can be of anything such as advertisements, hacking links, malware software or applications. Spam is also a malicious activity to create revenue or to inject virus into the system. ƒ Cookies: Cookies are plain text which can store user’s browsing information such as password of the site, logging activity, and recently viewed web pages. Cookies can be enabled or disable based on the user choice. Some malware disguise as cookies. For e.g.: super cookies, Zombie cookies which gets recreated even after deletion also. Some websites share the user data to the third-party websites in order to earn revenue. The sharing of the user data is mainly for the revenue purpose. For e.g.: If we search something on a shopping site or some other site, the same thing will come as an advertisement to us whenever we connect to the internet.

ƒ Adware: Adware is a revenue-based malicious software. It generates ad based upon the user previous activity. While the user, click on the ad or open the link to view the content then the intruder gets money. Note: Malware, or malicious software, is any program or file that is intentionally harmful to a computer, network or server. ¾ Prevention Technology (ii) Firewall: It is a device or a software which can filter the network access to the system. If the firewall detects the malicious request, it can block their access to our system. This can be used to prevent from the unauthorised access or intruders. The firewall filters both incoming and outgoing requests. The firewall is of two types namely: ƒ Host-Based Firewall: Firewall is placed between the network and the monitor to maintain the network traffic. ƒ Network-Based Firewall: Firewall is placed between the network devices to monitor the network traffic. (ii) HTTP: Hyper Text Transfer Protocol(HTTP) protocol is used for loading the website or webpages using a hypertext link. This allows the authorized websites to access. The SSL certificate is not present along with this protocol. Hence confidential data cannot be transferred using this protocol. (iii) HTTPS: Hyper Text Transfer Protocol Secure(HTTPS) protocol is similar to HTTP but the difference is it is associated with the secure certificate. This certificate checks the originality and source of the website. After the authentication of the website, it allows the user to access the site. Private information can be shared across this protocol. ¾ Preventive Steps: There are some of the steps which we have to follow regularly to protect our system from the threats or vulnerabilities. The steps are: { Using Anti-virus { Manage { Block { Use

in the system.

Browser security settings

the unwanted notifications or pop-ups.

the original licensed software alone.

{ Regularly

update the system.

{ Take

a regular backup of the system which will protect us from data loss. { Always { Never

update the firewall in the system

share any sensitive data with the third-party sites or to any person.

White Hat Hackers

Grey Hat Hackers

A person who intrude into another system

Black Hat Hackers

Hacker

Antivirus

Prevent and detect the virus

cu Se

Network Security Threats

Threats and Prevention

• Denial of service • Intrusion problems • Snooping • Eavesdropping

rity Aspect s

Kaspersky

First Level

Second Level

Third Level

Network based Firewall

Trace the Mind Map

Host based Firewall

• Virus (Vital Information under Siego • Worms (Standalone program) • Spam (Junk Mail) • Trojan Horse (does not have self-relication) • Cookies (store user's browsing information) • Adware (revenue based malicious software) • Firewall (filter the network)



Macfee



AVG



Norton

SECURITY ASPECTS

65

66 Oswaal CUET (UG) Chapterwise Question Bank { Remove all the programs which you did not recognize it. { Close

all the apps after usage. Don’t allow to run back-

ground apps. { Not to click unwanted links.

{ Do not respond to the unwanted mail or messages. { Always use a secure transfer protocol for online transactions.

¾ Network Security Concepts:

INFORMATICS PRACTICES

update the antivirus, the virus definition does not get updated and hence the malware enters into the system.

Scan to know more about this topic

(ii) Sandbox Detection: A new application or file is executed in a virtual environment called as sandbox. Their behaviours are recorded. Depending on the behaviours, the antivirus engine detects the virus. This process is slow but it provides efficient results.

Computer Security Hackers and Crackers

(iii) Data Mining Techniques: This method uses various machine learning techniques to find out whether the virus is malicious or not.

{ Hacker: Hacker is a person who intrude into another system in order to delete, modify or steal their personal information. Hacking can be done in both ethical and unethical ways.

¾ Type of Hackers: (i) White-Hat Hackers: They are also called as Ethical Hackers. They hack the system in an ethical way. They are official persons approved by the company or organisation or government. (ii) Black-Hat Hackers: They are illegal Hackers. They use their knowledge to hack for their personal intentions. They are subject to the law-and-order punishments. (iii) Grey-Hat Hackers: They are neutral people. They can hack the other person’s system for the fun activity not in the intention purpose. Cracker: Cracker is an outdated term. Cracker is a person who can intrude into another user system and bypass the information such as stealing passwords, or licenses for revenue purposes. ¾ Antivirus: (i) Antivirus is a software which can prevent and detects the virus or any other malicious activity involved in our system. (ii) It has to be updated in a regular manner. Hence the security patches get updated. (iii) It has to either installed from an original CD or from their own website. Never install the pirated Scan to know more about version or pop-up ad antivirus. this topic (iv) All antivirus has same base functionality and different unique features. Each antivirus works for each vulnerability.

What is Anti ¾ Working of an Antivirus: virus and how (i) It Scans the entire system that init is work cludes all the files, operating system, applications and programs. (ii) Quarantine the infected files and programs (iii) Delete the infected files after asking the consent from the user.

¾ Examples of Antivirus: McAfee, Norton, AVG, Kaspersky Security. ¾ Methods of Virus Identification by Antivirus (i) Signature-based Detection: This consists of a file named Virus Definition File (.vdf). This file is updated on a regular basis. All the antivirus gets cross checked with this file and deletes the malware enters into the system. If we failed to

(iv) Heuristics: It follows a certain pattern. All the source code follows a certain pattern. Based upon this pattern, the antivirus detects the virus whether it is a malicious or not. (v) Real-time Protection: Some viruses are remained quiet for some time and active for some time. This has to be monitored on a real-time basis. Hence the antivirus has to be run in the background to monitor this activity. ¾ Network Security Threats: (i) Denial of Service: Denial of Service (DoS) attack means it shut down the entire system or network. It creates a flood over the network and stops the user to access their intended website. This attack mainly happens in the email, online banking, e-commerce sites. (ii) Distributed Denial of Service: It is a variant of DoS. A Zombie system or main server is created with Botnet. This was distributed across a globe or a wide area network. When there is a demand or need, the attackers decide to spread this traffic across a global and get access to their intent system. DoS attack is somewhat we can trace it since the request comes from a single source whereas DDoS attack is very difficult to trace because the request comes from multiple locations. (iii) Intrusion Problems: Intrusion problem is related to the security issue. It creates a series of security issues which will create a security incident. During this issue, the intruder intrudes into the system and steals the sensitive data. This problem mainly focuses on digital resources. There are several attacks included with this Intrusion Problem. They are: ƒ Asymmetric Routing: The attacker bypasses the network path. They try to send the packets in the multiple paths to the sender which will get confused by the sender and the attacker intrudes into the system through one of the paths. ƒ Buffer Overflow Attacks: The attacker overwrites the certain memory areas of the user system. This program gets executed automatically without the user knowledge. When the program gets error or the memory buffer gets overflow, the attacker intrudes into the system or gains access to the system. ƒ Traffic Flooding: It is the most common intrusion problem. It mainly affects the network and causes flooding in the network. During this traffic, the intruder selects the packets and gets intruded into the system. (iv) Snooping: This refers to the secret listening of the activity. It creates a traffic in the network and capture all the packets. After analyzing the packets with snoop software, it replaces the packet in the same network traffic itself. Snooping can be vulnerable based upon the information it collected from

67

SECURITY ASPECTS

the packets. Snooping is also called as sniffing. This attack does not happen every time. (v) Eavesdropping: In general, it is called as overhearing. Attackers or intruders, steal the data modify it or delete the

data. This is mainly happening in the email. The data which can be transferred between two devices through less secure protocol, the data can be stolen by the hackers easily. But this type of hacking activity can be spotted by the user is difficult.

OBJECTIVE TYPE QUESTIONS [A] MULTIPLE CHOICE QUESTIONS 1. Which malware is used to generate revenue for its developer? [CUET 2022] (A) Spyware (B) Adware (C) Trojan (D) Ransomware 2. The hacker takes the advantage of congested and chaotic network environment to sneak into system undetected.  [CUET 2022] (A) Asymmetric Routing (B) Butter Overflow attacks (C) Traffic Flooding (D) Denial of Service 3. DoS Stands for: (A) Denial-of-Society (C) Development-of-Service

(B) Denial-of-Security (D) Denial-of-Service

4. A set of unauthorized access to a computer, computer network or any digital system: (A) Sign In (B) Hacking (C) Tracking (D) None of these 5. The electronic equivalent of the Junk Mail is : (A) Adware (B) Cyber fraud (C) Spam (D) Packets 6. A is someone who breaks into someone else’s computer system, often on a network; bypasses passwords or licenses: (A) Hacker (B) Cracker (C) Worm (D) Malware 7. To prevent unauthorized access to and / or from the network, a system known as ____________, can be implemented by hardware and / or software. (A) Firewall (B) Spacewall (C) Cyberwall (D) None of these 8. Which of the following is not a type of cybercrime? (A) Data Theft (B) Installing antivirus for protection (C) Forgery (D) Cyber Bullying 9. One limitation of antivirus programs is that they: (A) Sometimes start behaving like a virus (B) Are very expensive (C) Harm the computer (D) Can detect only those viruses for which they are programmed 10. Hackers usually used the computer virus for ________ purpose: (A) To log, monitor each and every user’s stroke (B) To gain access of the sensitive information like user’s Id and Passwords (C) To corrupt the user’s data stored in the computer system (D) All of the above

11. To avoid problems while working on the Internet, you should follow these precautions. (A) Install antivirus on your computer (B) Take the backup of your files regularly (C) Do not click on unknown links (D) All of the above 12. Which of the following is called black hat hacker? (A) Ethical hacker (B) Non-Ethical hacker (C) Both of the above (D) None of these 13. What is the best statement for taking advantage of a weakness in the security of an IT system? (A) Threat (B) Attack (C) Exploit (D) Vulnerability 14. The full form of Malware is ________. (A) Malfunctioned Software (B) Multipurpose Software (C) Malicious Software (D) Malfunctioning of Security 15. What is the purpose of SSL Certificate in HTTPS? (A) To keep user data secure (B) Verify ownership of the website (C) Convey trust to users (D) All of these 16. I Am malware Am standalone program and capable of working on my own Nimda, Code Red are some of my examples Who am I? (A) Firewall (B) Worm (C) Trojan (D) Spyware 17. Which of the following is an independent Malicious Program that need not any host program? (A) Trap Doors (B) Trojan Horse (C) Worm (D) Virus 18. Which of the following malicious program do not replicate automatically? (A) Zombie (B) Trojan Horse (C) Worm (D) Virus 19. A Computer Virus is a : (A) Hardware (C) Freeware

(B) Software (D) None of these

20. A is a type of software designed to help the user’s computer detect viruses and avoid them. (A) Adware (B) Malware (C) Antivirus (D) Both (A) and (B)

68 Oswaal CUET (UG) Chapterwise Question Bank (B) ASSERTION REASON QUESTIONS Directions: In the following questions, A statement of Assertion (A) is followed by a statement of Reason (R). Mark the correct choice as. (A) Both A and R are true and R is the correct explanation for A. (B) Both A and R are true and R is not correct explanation for A. (C) A is true but R is false. (D) A is false but R is true. 1. Assertion (A): Internet cookies are text files that contain small pieces of data, like a username, password and user’s preferences while surfing the internet.

Reason (R): To make browsing the Internet faster & easier, it’s required to store certain information on the server’s computer.

2. Assertion (A): Cookies are plain text files.

Reason (R): Cookies store the Profile picture on social media.

3. Assertion (A): Hacking is a malicious activity.

Reason (R): Hacking involves stealing password and other sensitive information.

4. Assertion (A): Firewall is a network security technology.

Reason (R): Firewall is a device or a software which can access or monitors the network traffic and prevents the unauthorised access.

5. Assertion (A): Virus is a self-replicated malicious program

Reason (R): Virus does not need any host to intrude.

6. Assertion (A): DoS is a Denial-of-Service Attack.

Reason (R): It is a malicious activity which denies the service to the user by flooding the network or creates a traffic in the network.

7. Assertion (A): Eavesdropping means intruding of hackers to delete or modify the data transmitted between two people.

Reason (R): Eavesdropping is often difficult to spot.

8. Assertion (A): Network Intrusion is any illegal activity carried out in a digital network.

Reason (R): The main aim of this network intrusion is to steal the valuable digital resources from the user.

9. Assertion (A): Crackers are unethical ones.

Reason (R): Crackers are persons, who can perform illegal tasks for their own benefits.

10. Assertion (A): HTTP is Hyper Text Transfer Protocol.

Reason (R): It does not use SSL certificate.

INFORMATICS PRACTICES

[C] CASE BASED QUESTIONS I. Read the following text and answer the questions that follow: (Q1-Q5)

XYZ is the administrator of a school computer network. Help him to take appropriate decision to achieve computer security and safe online access.

1. Suggest a device to be used to filter network traffic to/from school network to provide network security (A) Firewall (B) Routers (C) Switch (D) Modem 2. Which software can be used to get protection from Viruses and spyware? (A) Keylogger (B) Trojan Horse (C) Spyware (D) Antivirus 3. Tell him what he has to disable in browser so that online patterns are not tracked (A) Cookies (B) Pop Up Menu (C) Permissions (D) Site settings 4.

Suggest an active protection mechanism so that he can find a solution to spam (A) Anti-spam software (B) Spyware (C) Windows Defender (D) Virus 5. Suggest an active protection solution to PC Intrusion (A) Authorization (B) Authentication (C) Firewall (D) All of these II. Read the following text and answer questions that follow: (Q6-Q10)

A person system gets infected by virus. He/she is unaware about the antivirus. Help him to know about the antivirus concepts and protect him/her system.

6. Which of the following are antivirus software? (A) McAfee (B) AVG (C) Google chrome (D) Both (A) and (B) 7. Which of the following statements is not true about antivirus? (A) Locates infected files (B) Search for the virus and deletes it (C) Once installed, need not to be updated (D) Scans the entire system 8. What is meant by Pirated antivirus software? (A) Copied from original software (B) Reinstalled software (C) Loaded from original CD (D) None of the above 9. Main components of antivirus solution are: (A) Virus Definition (B) Scanner (C) Quarantine (D) All of these 10. What is antivirus also called as? (A) Anti- Malware (B) Spyware (C) Adware (D) Malware

69

SECURITY ASPECTS

ANSWER KEY [A] MULTIPLE CHOICE QUESTION 1. (B)

2. (C)

3. (D)

4. (B)

5. (C)

6. (B)

7. (A)

8. (B)

9. (D)

10. (D)

11. (D)

12. (B)

13. (C)

14. (C)

15. (D)

16. (B)

17. (C)

18. (B)

19. (B)

20. (C)

7. (B)

8. (A)

9. (A)

10. (B)

7. (C)

8. (A)

9. (D)

10. (A)

[B] ASSERTION REASON QUESTIONS 1. (C)

2. (C)

3. (A)

4. (A)

5. (C)

1. (A)

2. (D)

3. (A)

4. (A)

5. (D)

6. (A)

[C] CASE BASED QUESTIONS 6. (D)

ANSWERS WITH EXPLANATION [A] MULTIPLE CHOICE QUESTIONS

9. Option (D) is correct.

1. Option (B) is correct.

Explanation: Every antivirus is programmed specifically. It can detect those viruses and prevents them.

Explanation: Adware is a malicious software which will provide advertisements automatically on the screen and generates revenue to the developer. While clicking the ad, the revenue will be generated automatically to the developer. 2. Option (C) is correct. Explanation: It is a type of DOS attack. It mainly affects web servers. It creates a traffic in the website which creates a decrease in the performance of the site. During this traffic, the hackers used this situation to intrude into their system. 3. Option (D) is correct. Explanation: A Denial-of-Service (DoS) attack is an attack meant to shut down a machine or network, making it inaccessible to its intended users. 4. Option (B) is correct. Explanation: Hacking means access to one’s data without their permission. Hackers can hack through data by any means of ways such as networks or system. 5. Option (C) is correct. Explanation: Spam is generally referred us unwanted or malicious mail. It can be sent as a bulk to many numbers of people. Spam mail is generated in order to capture user’s sensitive data. 6. Option (B) is correct. Explanation: Cracker is a person who breaks into other persons system illegally. Mainly Cracker uses network to break into someone else systems. 7. Option (A) is correct. Explanation: A Firewall is a network security device. It has a predefined set of rules. Based upon that rule, it can prevent or detect the unauthorized usage or interruption in our network. It is a protecting device which is available in both forms either hardware or software. 8. Option (B) is correct. Explanation: Antivirus is a software which can prevents the virus attacks into the system. It is one of the major preventive measures from the network attacks. It is a prevention of virus not a crime.

10. Option (D) is correct. Explanation: Hackers main functionality is to access or take the control of the user’s system entirely. They are used to access our sensitive information, monitor our login information and damages our system or our personal belongings such as banking etc… 11. Option (D) is correct. Explanation: : While working with the internet, the networking practices were needed in order to avoid any threats or unwanted problems. We need to •

update our antivirus software regularly,



maintain a backup for a week or a month based upon our data.



should not respond to any unknown mails or links.

12. Option (B) is correct. Explanation: Black hat hackers are persons who can use their knowledge unethically to hack someone’s system. This is illegal way of hacking. 13. Option (C) is correct. Explanation: Exploit is a piece of code or a program. This can be used by the hackers to spread malware into the user’s system. This is a major threat to the network security. It mainly focusses on the weakness of the operating system, applications or software. 14. Option (C) is correct. Explanation: Malware is a Malicious Software that is intentionally designed in order to provide harmful to the system. 15. Option (D) is correct. Explanation: SSL means Secure Socket Layer. The main objective of this layer is to secure user information, protecting the user from accessing the unauthorized website. The SSL verifies the digital certificate of the website, conforms its identity and then sends the information. 16. Option (B) is correct.

70 Oswaal CUET (UG) Chapterwise Question Bank Explanation: Worm is a standalone program which can enters into the system and gets replicated. Some of the common worms are Storm Worm, Sobig, Msblast, Code Red etc. 17. Option (C) is correct. Explanation: A worm is a type of malware. It is an independent program whose primary function is to replicate n number of times inside the system. 18. Option (B) is correct. Explanation: Trojan horse is a malicious standard program. It looks like a true legitimate application but it is a malware. Many hackers make use of it to steal data. 19. Option (B) is correct. Explanation: Virus is a software. It is a self-replicative in nature. Virus which enters into the system gets multiplied by n number of times and damages the entire system. 20. Option (C) is correct. Explanation: Antivirus is a software which has been designed to prevent or detect the virus or any other malicious activity identified in the system

[B] ASSERTION REASON QUESTIONS 1. Option (C) is correct. Explanation: Make the browsing faster and easier we cannot use multiple tabs at the same time. If the loading of a page is reduced, then we can easily browse the internet 2. Option (C) is correct. Explanation: Cookies are text files which are used to store passwords, or browser related information. It does not store profile picture. Cookies are enabled and disabled based upon the user’s choice. 3. Option (A) is correct. Explanation: Hacking is a malicious activity which involves in stealing the user data without their consent. 4. Option (A) is correct. Explanation: Firewall is a security technology which can prevents the malicious activity before entering into the system. It is implemented in both hardware and software. 5. Option (C) is correct. Explanation: Virus is a self-replicated malicious program which needs host program to invade into the system. After invading, it gets multiplied several times and affects the system. 6. Option (A) is correct. Explanation: Denial of Service attack is made by the hackers in order to shut down the machine or network. Their main intention is to prevent the users from getting their preferred services. 7. Option (B) is correct. Explanation: Eavesdropping means the hackers can delete or modify the data transferred between two people through insecure or not encrypted network service or protocol. It will happen in the transport layer which can be difficult to spot out by the user. 8. Option (A) is correct.

INFORMATICS PRACTICES

Explanation: Network intrusion is a series of multiple security events which cause a security incident through which the intruder enters into the system and steals the digital resources of the user. 9. Option (A) is correct. Explanation: Crackers are unethical persons who can broke into other systems and steals their information for the benefit of their own. They steal the data intentionally. 10. Option (B) is correct. Explanation: HTTP is an application layer protocol which can be used to load webpages using hypertext links. HTTP protocol is not secure one; since it does not use SSL certificate.

[C] CASE BASED QUESTIONS 1. Option (A) is correct. Explanation: Firewall is a hardware device which can be used to filter data and provide network security. 2. Option (D) is correct. Explanation: Antivirus is a software which is pre-programmed in order to identify the virus or any other malicious activity present in the system. 3. Option (A) is correct. Explanation: Cookies are plain text files which can store the browser activity details such as password, login information etc. Cookies can be enabled or disabled based on the user’s choice only. 4. Option (A) is correct. Explanation: Anti-spam software is designed specifically for the purpose of detecting or removing the spam that intrudes into the system. 5. Option (D) is correct. Explanation: Intrusion occurs due to the security incident which can be prevented by using authorization and authentication of the websites by checking their originality and source. Firewall helps to identify the malicious network request and denied to enter into the system. Hence all the options are used as an active solution to PC intrusion. 6. Option (D) is correct. Explanation: There are various types of antiviruses present. Among these, google chrome is not an antivirus, it is a browser. Other than google chrome, all the others are antivirus software. 7. Option (C) is correct. Explanation: Antivirus is a software which can be used to detect and delete the virus which affect our system. It has to be updated in a regular manner, because every time of updating we get new security patches which will enhance our security more. 8. Option (A) is correct. Explanation: Pirated antivirus software means it is a software which has been copied from the original. This type of software works without license, it does not have original functionalities. It can either spread the virus instead of removing the virus. 9. Option (D) is correct.

SECURITY ASPECTS

Explanation: The components of antivirus solution are: • Virus Definition: Identify and remove virus • Scanner: Scans entire system • Quarantine: Isolate the affected files and programs

71 10. Option (A) is correct. Explanation: Antivirus is also called as Anti-Malware which means it can protect the system from the malware or suspicious activity.