Which of the following is not an integer literal?
1.1
2.7
3.98
4.“4â€
Write the output of the following: x = int(7) + int (‘9’) print(x)
1.79
2.16
3.Error
4.None of the above
101. >>> bool(0) evaluates to _
1.False
2.True
3.Error
4.None of the above
86. Which of the following is an exponent operator?
1.*
2./
3. **
4.***
A program written in a high-level language is called _________ code
1. Object
2.Source
3.Machine
4.None of the above
An ordered set of instructions to be executed by a computer to carry out a specific task is called ___
1.Algorithm
2.Pseudocode
3.Program
4.None of the above
An _______________ is a symbol which is used to perform specific mathematical or logical operation on values.
1.Operand
2.Operator
3.Keyword
4.Identifier
By default, the Python scripts are saved in ____
1.Document
2.Desktop
3.Python installation folder
4.D drive
By default, the Python scripts are saved with ____________ extension.
1.pyp
2.pys
3.py
4.None of the above
Comments in python program are ________________ by interpreter
1.executed
2. not executed
3.given
4.shared
Computers understand the language of 0s and 1s which is called _______
1.Machine Language
2.Low level Language
3.Binary Language
4.All the above
In Python multi line comment starts with _________
1.%
2./*
3.!
4.#
In Python single line comment starts with __
1.%
2. /*
3.!
4.#
In which of the following mode, the interpreter executes the statement and displays the result as soon as we press ‘Enter’ key?
1.Interactive mode
2. Script mode
3. Hybrid mode
4.None of the above
Language translator convert ______________ code to _______________ code.
1.Source, Object
2.Object, Source
3.Machine , Source
4.None of the above
Multiline string in python can be created by enclosing text in ____
1.Single quotes(‘ ‘)
2.Double quotes(†“)
3.Triple quotes(â€â€™ â€â€™)
4.All the above
Operators work on values called ___
1.Operating
2.Operand
3.data value
4.Opvalue
Out of addition(+) and Subtraction (-) operator, which has more precedence?
1.Addition (+)
2. Subtraction (-)
3.Both have same precedence
4.None of the above
Output of print(2 * 3 ** 2) is
1.16
2.64
3.18
4.Error
print(3 != 4) will evaluates __
1.True
2.False
3.Error
4.None of the above
print(bool(3 and 6)) evaluates to __
1.False
2.True
3.Error
4.None of the above
print(bool(True and True or False)) evaluates to ___
1.False
2.True
3.Error
4.None of the above
Python uses ____ to convert its instructions into machine language.
1.Interpreter
2.Compiler
3.Both of the above
4.None of the above
Statement x += y is equivalent to ______
1.x = x + y
2.x = x * y
3.y = x + y
4.y = y * x
The smallest individual unit in a program is known as _
1.Token
2.Punctuators
3.Literals
4.Operators
Variables of data types like integers, float etc., hold __
1.single value
2.multiple values
3.exact 2 values
4.None of the above
Variables whose values can be changed after they are created and assigned are called __
1.mutable
2.immutable
3.changeable
4.None of the above
What is the return type of function id( )?
1.float
2.string
3.int
4.None of the above
Which escape sequence represent newline character?
1.
2. e
3.
4. T
Which of the following is a sequence data type?
1.String
2. Integer
3.Float
4.Dictionary
Which of the following is an assignment operator?
1.=
2./=
3.*=
4.All the above
Which of the following is an invalid relational operator in Python?
1.!=
2.==
3.>=
4.<>
Which of the following is invalid data type in python?
1.List
2.String
3.tuple
4.values
Which of the following is invalid logical operator?
1. and
2.or
3.not
4.xor
Which of the following is mapping data type in Python?
1.String
2.List
3.Dictionary
4.Tuple
Which of the following is not correct for naming an identifier in Python?
1.Identifier can be of any length
2.Identifier should not be a keyword
3.We cannot use special symbols like !, @, #, $, %, etc., in identifiers
4.Spaces are allowed in identifiers
Which of the following is not the feature of python language?
1.Python is a proprietary software.
2.Python is not case-sensitive.
3. Python uses brackets for blocks and nested blocks.
4.All the above
Which of the following is number data type in python?
1.Integer
2.Complex
3.Boolean
4.All the above
Which of the following is String literal?
1.ABC
2.123â€
3.Both of the above
4.None of the above
Which of the following is token in Python?
1.Punctuators
2.Literals
3.Keywords
4.All the above
Which of the following statement display “RAM†two times?
1.>>> “RAM†+ 2
2.>>> “RAM†* 2
3.>>> “RAM†** 2
4.None of the above
Which of the following statement will return error when x = 7 ?
1.print(x)
2.print(int(x))
3. print(eval(x)
4.None of the above
Which of the following store data in pair?
1.List
2.Tuple
3.String
4.Dictionary
Which operator returns remainder?
1. /
2.//
3.%
4. \
Write the output of the following : >>> a = 'India' >>> a *= 3 >>> a
1.IndiaIndiaIndia
2.India3
3.3India
4.None of the above
Write the output of the following : >>> num1 = 7 >>> num2 = 3 >>> num1 //= num2 >>> num1
1.3
2.7
3.2
4.8
Write the output of the following: >>> 7 % 3 ** 3
1.1
2.7
3.3
4.27
________ are reserved words.
1.Keywords
2. Identifiers
3.Variables
4.Comments
_________ is a set of valid characters that a language can recognize.
1.identifier
2.Token
3.Character set
4.Character group
__________ operators are used to check if a value is a member of the given sequence or not.
1.Logical
2.Identity
3.Membership
4.Relational