Python Quiz 4

Python Quiz 4

University

90 Qs

quiz-placeholder

Similar activities

1er. Parcial Software de Base

1er. Parcial Software de Base

University

94 Qs

100 lệnh MS-DOS

100 lệnh MS-DOS

University

94 Qs

spi final reviewer

spi final reviewer

University

93 Qs

Data Science Fundamentals Worksheet

Data Science Fundamentals Worksheet

University

91 Qs

Python Quiz - 6 BF

Python Quiz - 6 BF

University

88 Qs

CCNA

CCNA

University

95 Qs

Quizz1

Quizz1

University

95 Qs

PRJ301

PRJ301

University

95 Qs

Python Quiz 4

Python Quiz 4

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

Nguyen Duong

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?