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
91 questions
Data Science Fundamentals Worksheet

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

Quiz
•
University
86 questions
Java syntax

Quiz
•
University
90 questions
Python Programming Quiz

Quiz
•
University
90 questions
Strings in Python

Quiz
•
University
90 questions
MSTIP-CC102-FinalExam

Quiz
•
University
86 questions
IIS Review Prep Quiz

Quiz
•
University
86 questions
FoP Prelims Review

Quiz
•
University
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade