Python :: String review

Quiz
•
Computers
•
University
•
Medium
ALBERTO HILARIO
Used 15+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following adds a line comment in Python?
// comment here
# comment here
"" comment here
/* comment here */
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following concatenates strings in Python?
'hello' & 'world'
'hello' -> 'world'
'hello' += 'world'
'hello' + 'world'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will produce "ppp"?
'p' *= 3
'p' = 'p'*3
'p' * 3
'p' x 3
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print('python'[0:2])?
py
yt
pyt
on
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print('python'[1:4])?
pyth
yth
ytho
pyt
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of print('HELLO WORLD'.lower())?
hello world
Hello world
HELLO WORLD
Hello World
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How would you capitalize 'hello world'?
'hello world'.uppercase()
'hello world'.upper()
'hello world'.toUpper()
'hello world'.go_upper()
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Day 10 - ONLINE TEST - PL03 PYTHON PROGRAMMING

Quiz
•
University
15 questions
Control Statements - Java

Quiz
•
University
20 questions
Review JavaScript

Quiz
•
11th Grade - University
20 questions
AlgoProg - Review Quiz

Quiz
•
University
20 questions
Week 6 Quiz

Quiz
•
University
20 questions
JavaScript Quiz

Quiz
•
University
20 questions
SD-U3.1.Dockers y Containers

Quiz
•
University
15 questions
PyTron

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University