0% found this document useful (0 votes)
102 views

Python Fundamentals Book Ex

The document contains multiple choice, fill in the blanks and true/false questions about Python fundamentals like keywords, identifiers, literals, operators, expressions, comments, print and input functions. It tests the understanding of basic Python concepts.

Uploaded by

sianasimon2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Python Fundamentals Book Ex

The document contains multiple choice, fill in the blanks and true/false questions about Python fundamentals like keywords, identifiers, literals, operators, expressions, comments, print and input functions. It tests the understanding of basic Python concepts.

Uploaded by

sianasimon2007
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter 7

Python Fundamentals
Class 11 - Computer Science with Python Sumita Arora
Multiple Choice Questions

Question 1

Special meaning words of Pythons, fixed for specific functionality are called .......... .

1. Identifiers
2. functions
3. Keywords ✓
4. literals

Question 2

Names given to different parts of a Python program are .......... .

1. Identifiers ✓
2. functions
3. Keywords
4. literals

Question 3

Data items having fixed value are called .......... .

1. Identifiers
2. functions
3. Keywords
4. literals ✓

Question 4

Which of the following is/are correct ways of creating strings ?

1. name = Jiya
2. name = 'Jiya' ✓
3. name = "Jiya" ✓
4. name = (Jiya)
Question 5

Which of the following are keyword(s) ?

1. name
2. Print
3. print ✓
4. input ✓

Question 6

Which of the following are valid identifiers ?

1. my name
2. _myname ✓
3. myname ✓
4. my-name

Question 7

Which of the following are literals ?

1. myname
2. "Radha" ✓
3. 24.5 ✓
4. 24A

Question 8

Escape sequences are treated as .......... .

1. strings
2. characters ✓
3. integers
4. none of these

Question 9

Which of the following is an escape sequence for a tab character ?

1. \a
2. \t ✓
3. \n
4. \b

Question 10
Which of the following is an escape sequence for a newline character ?

1. \a
2. \t
3. \n ✓
4. \b

Question 11

Which of the following is not a legal integer type value in Python ?

1. Decimal
2. Octal
3. Hexadecimal
4. Roman ✓

Question 12

Which of the following symbols are not legal in an octal value ?

1. 7
2. 8 ✓
3. 9 ✓
4. 0

Question 13

Value 17.25 is equivalent to

1. 0.1725E-2
2. 0.1725E+2 ✓
3. 1725E2
4. 0.1725E2 ✓

Question 14

Value 0.000615 is equivalent to

1. 615E3
2. 615E-3
3. 0.615E3
4. 0.615E-3 ✓

Question 15

Which of the following is/are expression(s) ?


1. a+b-5 ✓
2. a
3. -5
4. b-5 ✓

Question 16

The lines beginning with a certain character, and which are ignored by a compiler and not
executed, are called ..........

1. operators
2. operands
3. functions
4. comments ✓

Question 17

Which of the following can be used to create comments ?

1. //
2. # ✓
3. '''
4. ''' . . . ''' ✓

Question 18

Which of the following functions print the output to the console ?

1. Output( )
2. Print( )
3. Echo( )
4. print( ) ✓

Question 19

Select the reserved keyword in Python.

1. else
2. import
3. print
4. all of these ✓

Question 20

The input( ) returns the value as .......... type.


1. integer
2. string ✓
3. floating point
4. none of these

Question 21

To convert the read value through input( ) into integer type, ..........( ) is used.

1. floating
2. float
3. int ✓
4. integer

Question 22

To convert the read value through input( ) into a floating point number, ..........( ) is used.

1. floating
2. float ✓
3. int
4. integer

Question 23

To print a line a text without ending it with a newline, .......... argument is used with print( )

1. sep
2. newline
3. end ✓
4. next

Question 24

The default separator character of print( ) is ..........

1. tab
2. space ✓
3. newline
4. dot

Question 25

To give a different separator with print( ) .......... argument is used.

1. sep ✓
2. separator
3. end
4. tab

Fill in the Blanks

Question 1

A keyword is a reserved word carrying special meaning and purpose.

Question 2

Identifiers are the user defined names for different parts of a program.

Question 3

Literals are the fixed values.

Question 4

Operators are the symbols that trigger some computation or action.

Question 5

An expression is a legal combination of symbols that represents a value.

Question 6

Non-executable, additional lines added to a program, are known as comments.

Question 7

In Python, the comments begin with # character.

Question 8

Python is a case sensitive language.

Question 9

The print( ) function prints the value of a variable/expression.

Question 10

The input( ) function gets the input from the user.

Question 11
The input( ) function returns the read value as of string type.

Question 12

To convert an input( )'s value in integer type, int( ) function is used.

Question 13

To convert an input( )'s value in floating-point type, float( ) function is used.

Question 14

Strings can be created with single quotes, double quotes and triple quotes.

True/False Questions

Question 1

Keywords can be used as identifier names.


False

Question 2

The identifiers in Python can begin with an underscore.


True

Question 3

0128 is a legal literal value in Python.


False

Question 4

0x12EFG is a legal literal value in Python.


False

Question 5

0123 is a legal literal value in Python.


True

Question 6

Variables once assigned a value can be given any other value.


True

Question 7
Variables are created when they are first assigned their value.
True

Question 8

Python variables support dynamic typing.


True

Question 9

You can rename a keyword.


False

Question 10

String values in Python can be single line strings, and multi-line strings.
True

Question 11

A variable can contain values of different types at different times.


True

Question 12

Expressions contain values/variables along with operators.


True

You might also like