What arithmetic operators cannot be used with strings?

Python Quiz 4

Quiz
•
Computers
•
University
•
Hard
Nguyen Duong
FREE Resource
90 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
+
*
–
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
Similar Resources on Quizizz
93 questions
spi final reviewer

Quiz
•
University
95 questions
Mid Term Practice AX1

Quiz
•
University
86 questions
IIS Review Prep Quiz

Quiz
•
University
86 questions
FoP Prelims Review

Quiz
•
University
92 questions
A+Core 1 (200-300)#3

Quiz
•
10th Grade - University
85 questions
Test

Quiz
•
University
90 questions
Com-sci Quiz

Quiz
•
University
94 questions
1er. Parcial Software de Base

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade