Python Quiz 4

Python Quiz 4

University

90 Qs

quiz-placeholder

Similar activities

ITF+ pt2

ITF+ pt2

9th Grade - Professional Development

85 Qs

Activity 3.1 - Data Structures and Algorithms

Activity 3.1 - Data Structures and Algorithms

University

85 Qs

Prelim Exam HTML-CSS

Prelim Exam HTML-CSS

University

88 Qs

C++01输入输出

C++01输入输出

1st Grade - University

86 Qs

Information System

Information System

University

90 Qs

AC Circuits Final Review

AC Circuits Final Review

University

90 Qs

CS 241 Practice Test Week 4

CS 241 Practice Test Week 4

9th Grade - University

86 Qs

Ôn tập Tin học 4

Ôn tập Tin học 4

4th Grade - University

88 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?