Call
whatsapp
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
9447387064 | 9847003556
0471-2335855 | 8089080088 | 0471-2334855
Cisco Training in Trivandrum, Trinity Technologies

No.1 Training Institute in Kerala

PYTHON QUESTIONS : PART 2

What is the result of the expression shown below if x = 56.236?

print("%.2f"%x)

56.00

56.24

56.23

0056.236

SHOW ANSWER

What is the output of the code shown?

x= 33456789

%f%e%g' %(x, x,x)

Error

'3.3456789 3.3456789 +003345678'

'3.3456783.345678e+03.345678'

'3.3456793.345679e +00334568 '

SHOW ANSWER

Python comment statement begins with ----------

Hash symbol(#)

Dollar Symbol ($)

Ampersand (&)

None of the above

SHOW ANSWER

Group of individual statements making up a single code block is called a --------- in Python

snippet

block

module

Suite

SHOW ANSWER

Which of the following is not a complex number?

k 2 +3

k complex(2, 3)

k = 2 +31

k 2+3

SHOW ANSWER

What is the type of inf?

Boolean

Integer

Float

Complex

SHOW ANSWER

What is the result of cmp(3, 1)

1

o

True

False

SHOW ANSWER

Which of these in not a core datatype?

Lists

Dictionary

Tuples

Class

SHOW ANSWER

What datatype is the object below?

L [1, 23, 'hello', 1]

list

dictionary

array

tuple

SHOW ANSWER

What is the average value of the code that is executed belo

>>>grade 1 = 80

>>>grade2 = 90

>>>average = (grade1 + grade2)/2

85

85.0

95

95.1

SHOW ANSWER

What is the return value of trunc 0?

int

bool

float

None

SHOW ANSWER

What is the output of the snippet of code shown below?

hello, 'morning[book(")

error

no output

hello

morning

SHOW ANSWER

What is the output of the code shown below?

not(3 > 4)

not(1&1)

True

    True

True

     False

False

    True

False

False

SHOW ANSWER
BACK | NEXT
TRINITY SOFTWARE SOLUTIONS,IInd floor, Radheyam Towers, Gandhari Amman Kovil Road, Pulimood, Trivandrum - 1
0471-2334855 | 2335855 | 9447387064 | 9847003556 info@trinitytechnology.in