Python Quiz

Quiz
•
Computers
•
Professional Development
•
Medium
mari renga
Used 14+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
what is the output of print str * 2 if str = 'Hello World!'?
Hello World!Hello World!
Hello World! * 2
Hello World!
None of the above
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
what is the result of the following operation in Python:
3+ 2 * 2
10
12
9
7
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If you executed name = 'Lizz' , what would be the output of print (name[0:2])?
Li
Zz
Lizz
L
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
If you executed var = '01234567' , what would be the result of print(var[::2])?
0246
01234
1234
7531
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
what is the result of the following operation '1'+'2'
3
1
2
12
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Given myvar = 'hello', how would you convert myvar into uppercase?
len(myvar)
upper(myvar)
myvar.upper()
myvar.upper(myvar)
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
which of the following are valid ways to specify the string literal foo'bar in Python:
"""foo'bar"""
'foo\'bar'
foo'bar
foo"bar
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
JavaScript String Methods

Quiz
•
12th Grade - Professi...
12 questions
Тест по JS - 1

Quiz
•
Professional Development
15 questions
Foundations II. Challenge I

Quiz
•
Professional Development
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
10 questions
CodeTigers Python 101

Quiz
•
KG - Professional Dev...
10 questions
Python quiz

Quiz
•
10th Grade - Professi...
15 questions
Scope of Variables in Python

Quiz
•
1st Grade - Professio...
10 questions
Java SE: Programming I

Quiz
•
Professional Development
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