Python Quiz 4

Python Quiz 4

University

90 Qs

quiz-placeholder

Similar activities

Java fundamentals starts with Git

Java fundamentals starts with Git

University

87 Qs

technical round

technical round

KG - Professional Development

90 Qs

Python Interview Questions

Python Interview Questions

University

88 Qs

Mid Term Practice AX1

Mid Term Practice AX1

University

95 Qs

Python Quiz - 6 BF

Python Quiz - 6 BF

University

88 Qs

Quiz-6-Strings-sec-G

Quiz-6-Strings-sec-G

University

93 Qs

Python Programming Quiz

Python Programming Quiz

University

90 Qs

PRJ301

PRJ301

University

95 Qs

Python Quiz 4

Python Quiz 4

Assessment

Quiz

Computers

University

Hard

Created by

Nguyen Duong

FREE Resource

90 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What arithmetic operators cannot be used with strings?

+

*

All of the mentioned

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? >>>print (r"\nhello")

a new line and hello

\nhello

the letter r and then hello

error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python statement? >>>print('new' 'line')

Error

Output equivalent to print ‘new\nline’

newline

new line

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python statement? >>> print('x\97\x98')

Error

97 98

x\97

\x97\x98

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? >>>str1="helloworld" >>>str1[::-1]

dlrowolleh

hello

world

helloworld

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? print(0xA + 0xB + 0xC)

0xA0xB0xC

Error

0x22

33

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following Python code? class father: def __init__(self, param): self.o1 = param class child(father): def __init__(self, param): self.o2 = param >>>obj = child(22) >>>print "%d %d" % (obj.o1, obj.o2)

None None

None 22

22 None

Error is generated

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?