
Python Quiz 4

Quiz
•
Computers
•
University
•
Hard
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
Similar Resources on Wayground
85 questions
AUTOCAD TEST

Quiz
•
University
85 questions
Mega Quiz

Quiz
•
11th Grade - Professi...
91 questions
OCR GCSE Computer Science - J276 1.1 - 1.7

Quiz
•
KG - Professional Dev...
90 questions
Hardware#1

Quiz
•
University
94 questions
(2ND SEM IT) HISTORY OF COMPUTER

Quiz
•
University
91 questions
CS/IT Questions

Quiz
•
University
88 questions
Web Sys (FA1)

Quiz
•
University
86 questions
Kiến thức cơ bản về công nghệ thông tin

Quiz
•
University
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade