First Year Computer Science Chapter 2 Online MCQ Test for 1st Year Computer Science Chapter 2 (Information Networks)

ICS Part 1 Computer Science Chapter 2 Test

Start Chapter 2 Test

ICS Part 1 Computer Science Chapter Wise Test

MCQ's Test For Chapter 2 "Computer Science Ics Part 1 Chapter 2 Online Test"

Try The MCQ's Test For Chapter 2 "Computer Science Ics Part 1 Chapter 2 Online Test"

  • Total Questions15

  • Time Allowed20

Computer Science Ics Part 1 Chapter 2 Online Test

00:00
Question # 1

What does return do in a function.

Question # 2

What is the data type of the varable in this line. prise =19.99?

Question # 3

What is the result of dividing by zero in Python

Question # 4

What is the purpoe of slicing ?

Question # 5

Which looop is best for iterating over a sequence like a list or string. 

Question # 6

Which symbol is used for a single-line commet in Python.

Question # 7

What are default parameters in functions.

Question # 8

A range(functon used to generate a sequence of numbers.

Question # 9

What is debugging.

Question # 10

Avalid variable name in Python is

Question # 11

Which module works with dates and times.

Question # 12

What is the main purpose of programming.

Question # 13

What is a key advantage of using modules.

Question # 14

Which is a built -in data structure in Python.

Question # 15

An action needed during python instiallatio  to run from the command line asily

Prepare Complete Set Wise Chapter 2 "Computer Science Ics Part 1 Chapter 2 Online Test" MCQs Online With Answers


Topic Test

00:00
2nd Chapter

11th Class ICS Computer Science Chapter 2 MCQ's Test

Top Scorers Of Chapter 2 "Computer Science Ics Part 1 Chapter 2 Online Test" MCQ`s Test

  • M
    M Saad 29 - May - 2026 00 Min 47 Sec 15/15
  • T
    Toqeer Ahmad 16 - May - 2026 01 Min 24 Sec 15/15
  • S
    Sheikh Umer 02 - May - 2026 01 Min 25 Sec 15/15
  • M
    mureed 24 - Jun - 2026 10 Min 32 Sec 15/15
  • S
    Shaheer Adil 14 - Oct - 2026 02 Min 02 Sec 14/15
  • A
    Abdul Rafeh 20 - Jan - 2025 02 Min 32 Sec 14/15
  • M
    M Rabnawaz 07 - Jun - 2026 02 Min 44 Sec 14/15
  • A
    Angel Dust 01 - Oct - 2025 02 Min 51 Sec 14/15
  • M
    Malik Sameer 19 - May - 2026 02 Min 57 Sec 14/15
  • U
    Uzma Kafayat 01 - Feb - 2026 04 Min 57 Sec 14/15
  • M
    MeMeS BY UMãIR 19 - Jan - 2025 01 Min 43 Sec 13/15
  • R
    Rohaan Butt 23 - Sep - 2025 01 Min 49 Sec 13/15
  • A
    ABNxBOSS 10 - Nov - 2025 04 Min 29 Sec 13/15
  • M
    Muhammad Ahmad 03 - Oct - 2025 14 Min 02 Sec 13/15
  • B
    bashir “huzaifaahmed” khan 10 - Oct - 2026 17 Min 23 Sec 13/15

ICS Part 1 Computer Science (New Book) Chapter 2 Important MCQ's

Sr.# Question Answer
1

What is a library in Python.

A.

A single function 

B.

A list of variables

C.

A collection of modules

D.

A comment block

2

Which looop is best for iterating over a sequence like a list or string. 

A.

While loop

B.

for loop

C.

do -while loop

D.

switch loop

3

What does the with statemetn do when handling files.

A.

Keeps the file open

B.

Ensures the file is closed

C.

Delects the file

D.

Reades the file

4

A output of the following code is: temperature, humidity , wid_ speed 25,60,15

print("Hot and humid" if temperature >30 and humidity >50 else “Warm and breez” If temperatue ==25 and wind _speed>10 else “Cool and dry ”If temperature <20 and humidity < else “Moderate”)

A.

Warm

B.

Hot

C.

Cool

D.

Nothing

5

What does breaking a program into modules promote.

A.

Code duplication 

B.

Code reuse

C.

Increased complexity

D.

Longer development

6

What is functional testing.

A.

Speed testing

B.

Validating usr behaavior

C.

Syntax checking

D.

Database testing

7

Which keyward defines a function in Python.

A.

function 

B.

Define

C.

def

D.

fun

8

Which of the following is a valid variable name in Phyton.

A.

My _variable

B.

2nd Place

C.

my-Var

D.

@NAME

9

Where should you download Python from.

A.

any app store

B.

Third -party site

C.

https:// www..pyyhon.org.

D.

Rando download links

10

What happens in the exceptblock.

A.

Code execution stops

B.

Handles the error

C.

Creates a new file

D.

Compiles the code

Test Questions