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

What is an operator in Python.

<p>A value</p> <p>A symbol that performs an operation&nbsp;</p> <p>A comment</p> <p>A function&nbsp;</p>
2

How can you convert user input to an integer in Python.

<p>Using str()</p> <p>Using float ()</p> <p>Using int()</p> <p>Using bool ()</p>
3

What does the input () function do in Python.

<p>Displays output to the screen</p> <p>Waits for user input and sotes it as a string</p> <p>Converts data to integer</p> <p>Ends the program</p>
4

Which data tpe represents text in python.

<p>int</p> <p>str</p> <p>float</p> <p>bool</p>
5

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

<p>int</p> <p>str</p> <p>float</p> <p>bool</p>
6

What is the recommmended case for constants

<p>Camel Case</p> <p>Lowercase</p> <p>Uppercase with underscores</p> <p>snake_case</p>
7

Which is allowd n Python variable names.

<p>Spaces</p> <p>Hphenes(-)</p> <p>Underscores (_)</p> <p>Special symbols(#)</p>
8

Which variable name is invalid.

<p>my _var</p> <p>_count</p> <p>2nd _place</p> <p>MAX_VALUE</p>
9

Why should we used  meaningful variable names.

<p>To make code shorter</p> <p>To increased program speed</p> <p>To improve readibility and understianding&nbsp;</p> <p>To hide data from others</p>
10

Which of the following cannot be used as variable name in Phyton.

<p>age</p> <p>_score</p> <p>for</p> <p>user_name</p>
11

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

<p>My _variable</p> <p>2nd Place</p> <p>my-Var</p> <p>@NAME</p>
12

How can you  writ ea multi lne comment in Python.

<p>Using ‘//’ at each line</p> <p>Using &nbsp;triple quotes ('' “”' or ‘’ ‘" “ ”')</p> <p>Using square bracket '[[[[ ]]]]</p> <p>Using curly braces ‘{ &nbsp;}’</p>
13

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

<p>‘#’</p> <p>‘//’</p> <p>‘/**/’</p> <p>‘--’</p>
14

What is the purpose of comments in Python.?

<p>To run code faster</p> <p>To explain or note code for betterunderstanding</p> <p>To delete code permanently</p> <p>To change variable names</p>
15

Which tool is used to install Python packages.

<p>npm</p> <p>‘pip’</p> <p>‘git’</p> <p>‘apt’</p>
Download This Set

Is this page helpful?