Computer Science Ics Part 1 Chapter 2 Online Test With Answers

Computer Science Ics Part 1 Chapter 2 Online Test

Sr. # Questions Answers Choice
1

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>
2

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>
3

Which stateemnt allows checking multiple conditions in order.

<p>‘if’</p> <p>‘if-elif-else’</p> <p>'short -had if else</p> <p>‘if -else’</p>
4

What does an if statemetn do?

<p>Repeatss code many time</p> <p>Executes code only if a condition is true</p> <p>always rusn the else block</p> <p>Skips all conditions</p>
5

Which of the following is a type of decision- making structur ein Python.

<p>‘for’</p> <p>‘while’</p> <p>if -else</p> <p>range ()</p>
6

Waht are control structures used for in programming.

<p>To write comments</p> <p>To control the flow of a program</p> <p>To delete code</p> <p>To rename variables</p>
7

What will be he outpour (3+2) *2?

<p>6</p> <p>7</p> <p>10</p> <p>8</p>
8

Whcih has the highest preedence in Python expressions.

<p>Addition&nbsp;</p> <p>Parentheses ‘()’</p> <p>Multiplication&nbsp;</p> <p>Exponentiation</p>
9

What is the result of the expressi on? ‘3+4 *2’?

<p>10</p> <p>11</p> <p>14</p> <p>6</p>
10

What is an expression in Python.

<p>A comment</p> <p>A combination of values, variables, and operators.</p> <p>A variable name</p> <p>An error message</p>
11

What does the ‘=’ operator check. 

<p>Greater than</p> <p>Equality</p> <p>Less than</p> <p>Assigment</p>
12

Which of the following is a logical operator.

<p>‘_’</p> <p>‘+’</p> <p>not</p> <p>‘=’</p>
13

Which operator compares two values and returns True or False.

<p>Comparison</p> <p>Arithmetic</p> <p>Assignment</p> <p>Logical</p>
14

Which operator is used for exponentiation.

<p>**</p> <p>*</p> <p>//</p> <p>%</p>
15

Which of the following is an arithmetic operator.

<p>+</p> <p>==</p> <p>=</p> <p>and</p>
Download This Set

Is this page helpful?