Computer Science Ics Part 1 Online Test With Answers

Computer Science Ics Part 1 Online Test

Sr. # Questions Answers Choice
1

How do you use a module in code.

<p>By copying it</p> <p>By renaming it</p> <p>By importing it</p> <p>By printing it</p>
2

Which keyward defines a function in Python.

<p>function&nbsp;</p> <p>Define</p> <p>def</p> <p>fun</p>
3

What is a data structure in Python.

<p>A way to write comments</p> <p>A way to organize and store data</p> <p>A type of function only</p> <p>A metho to delete files</p>
4

What is the purspose of the range () function is Python.

<p>To create a list of strings</p> <p>To generate a sequence of numbers</p> <p>to store data in variables</p> <p>To compare values</p>
5

Which module works with dates and times.

<p>random</p> <p>math</p> <p>detetime</p> <p>os</p>
6

What are default parameters in functions.

<p>Parameters that can't change</p> <p>Parameters with preset values</p> <p>Parameters that break code</p> <p>Must use parameters</p>
7

What is a library in Python.

<p>A single function&nbsp;</p> <p>A list of variables</p> <p>A collection of modules</p> <p>A comment block</p>
8

Which is a built -in data structure in Python.

<p>Images</p> <p>Lists</p> <p>videos</p> <p>Sounds</p>
9

How do you use a module in code.

<p>By copying it</p> <p>By renaming it</p> <p>By imporitng it</p> <p>By printing it</p>
10

What is the data structue in Python?

<p>A way to write comments</p> <p>A way to organie and store data</p> <p>A type of function only</p> <p>A method to detete files</p>
11

What is the purpose of the range () function in Python.

<p>To create a list of strings</p> <p>To generate a sequence of numbers</p> <p>To store data in variables</p> <p>To compare values</p>
12

What does the range (5) function generate.

<p>Number from 0 to 5 including 5</p> <p>Numbers form 1 to 5</p> <p>Numbers from 0 to 4</p> <p>Only the number 5</p>
13

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

<p>While loop</p> <p>for loop</p> <p>do -while loop</p> <p>switch loop</p>
14

Which loop runs as long as a condition is true.

<p>‘for ’loop</p> <p>‘while ’ loop</p> <p>‘loop-until’</p> <p>repeat 'loop</p>
15

What si the shorthand version of if -else written in one lin called?

<p>Compact loop</p> <p>Ternary operaton</p> <p>Short function&nbsp;</p> <p>Inline comment</p>
Download This Set

Is this page helpful?