Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 12

Questions opt1 opt2 opt3 opt4 opt5 opt6 Answer

Python is script-
readable writable bug-able readable
said to be able
language language language language
easily language

Extensibl
e
program
ming
language
that can
be
extended Python Perl PHP Ada Python
through
classes
and
program
ming
interfaces
is

Python
was
released 1941 1971 1981 1991 1991
publicly
in

What is
the
output
when
following
the letter
code is a new
r and
executed line and \nhello Error \nhello
then
? hello
hello
print r"\
nhello"
The
output is
What is
the
output of
the
following
code ?
example snow snos
snow Error Error
= "snow world world
world"
example[
3] = 's'
print
example

Is Python
case
sensitive
machine
when
yes no depende none yes
dealing
nt
with
identifier
s?

Which of
the
following eval assert nonlocal pass eval
is not a
keyword?
In a
______str
ucture,
an action,
or event,
leads to
sequenc sequenc
the next decision control looping
e e
ordered
action in
a
predeter
mined
order.

all undersco
private re and
Which of
member ampersa
the
s must nd are none of
following
unlimite have the only the unlimite
is true for
d length leading two mention d length
variable
and special ed
names in
trailing characte
Python?
undersco rs
res allowed

Which of
the
abc= a,b,c = abc=
following abc = a_b_c =
1000 1000, 1000
is an 1,000,00 1,000,00
2000 2000, 2000
invalid 0 0
3000 3000 3000
statemen
t?

What is
the
machine
output of
1 0 depende Error 0
print 0.1
nt
+ 0.2 ==
0.3?
Which of
the
k=
following
k = 2 + 3j complex( k = 2 + 3l k = 2 + 3J k = 2 + 3l
is not a
2, 3)
complex
number?

Which of
the
following
data
types is number list string slice slice
not
supporte
d in
python?

What
data type
is the
Dictionar
object Lists Tuples Array Lists
y
below ?
L = [1, 23,
‘hello’, 1]

Which of
the
following
function int(x long(x
float(x) str(x) float(x)
convert a [,base]) [,base] )
string to a
float in
python?

Prints a
The
backslas
sequence Makes a Adds 5 Starts a Starts a
h
\n does link spaces new line new line
followed
what?
by a n
The
statemen
variable variable variable
ta=b
a into b into b into
copies error none
variable variable variable
the value
b a a
stored in
________

The
______
function
accepts
an scan edit print input input
optional
prompt
string.

The
_______
function
can be
used to
convert a
string
represent scan eval print input eval
ing a
numeric
expressio
n into its
evaluated
numeric
value.

Python
Guido Guido
was James Steve
Bill Gates van van
created Gosling Jobs
Rossum Rossum
by__
To start
Python
from the
command
execute run go
prompt, python python
python proram pyhton
use the
command
________
.

To run
python
script file
named execute run go
python python
t.py, use python python python
t.py t.py
the t.py t.py t.py
command
________
.

A Python
line
comment
begins // /* # @ #
with
________
.

A Python
paragrap
h
// /* '' /# ''
comment
commen commen commen commen commen
uses the
ts // ts */ ts ''' ts #/ ts '''
style
________
.
In
Python, a
syntax
error is compiler interpret
interpret compiler interpret
detected /at er/at
er/at /at er/at
by the compile compile
runtime runtime runtime
________ time time
at
________
_.

_______
is the
code in
natural A
A Python
language Python Pseudoc flowchar Pseudoc
stateme
mixed program ode t ode
nt
with diagram
some
program
code.

2 ** 3
evaluates
to 9 8 9.1 8.1 8
________
__.
The
following
is NOT an
int public double void public
example
of a data
type.
____oper
ators are
used to
check if
two
values (or
relationa boolean
variables) identity logical identity
l
are
located
on the
same part
of the
memory.

A _____
word
cannot be
variable reserved string token reserved
used as
an
identifier

______
are
identifier
s that
Keyword Keyword
have string variable token
s s
predefine
d
meanings
in Python

A _____
operator
performs
an binary unary trinary none unary
operation
using one
operand
_______
expressio
n, assignem arithmeti
bitwise Boolean Boolean
sometime nt c
s called a
predicate

In
Python, a
string
literal is parenthe single- braces single-
brackets
enclosed ses quotes quotes
in
________
__.

Which of
the
following
operators = * + _ =
are right-
associativ
e.

Which
operator
is
overloade || | // / |
d by the
or()
function?

What is python python


the name do not do not
of data have any have any
type for char data type charcter chr data type
character for for
in python characte characte
? rs rs
In
python 3
returns
what Float Integer same as Integer
remaind
does // division division a**b division
er
operator
do ?

The
following
is NOT an
int public double void public
example
of a data
type.

Identifier
s must
contain at
one two three four one
least
____char
acter

A
An entity sequenc An entity
that e of that
A A way of A kind of
receives characte receives
function storing compute
inputs rs inputs
is: values r
and enclosed and
outputs by outputs
quotes

___keyw
ord is
defs def decalre dec def
used to
define a
function.

What is
"Program
ming is ram ra r pr ra
fun"[4:
6]?
What is
"Program
pr ram ra n n
ming is
fun"[-1]?

What is
"Program
ming is pr p r '' ''
fun"[1:1]
?

A ____ is
a file
containin
g Python
definition
preproce
s ,functio operator module format module
ssor
ns,
statemen
ts and
instructio
ns.

Suppose s
=
"Welcom
int float string str str
e", what
is
type(s)?

The
format
function an int a float a str a chat a str
returns
_______.

Assume x
= 4 and y
= 5,
not (x ==
Which of x != 4 x == 5 x != 5 x != 5
4)
the
following
is true?
________ list1 =
__ list1 = list1 =
list1 = [] list([12, All
creates a list() [12, 4, 4]
4, 4])
list.
_______
terminate
s the abort() exit() assert() all exit()
process
normally.

The
________
__
function
sys.termi sys.stop(
immediat sys.halt() sys.exit() sys.exit()
nate() )
ely
terminate
s the
program.

Python James Bill Steve Guido Guido


was Gosling Gates Jobs van van
created Rossum Rossum
by
What is 7 1 0 5 1
answer of
this
expressio
n, 22 % 3
is?

What is 27 9 3 1 3
the output
of this
expressio
n,
3*1**3?

You might also like