
Python Strings
Quiz
•
Education
•
Professional Development
•
Practice Problem
•
Hard
Meena Natarajan
Used 2+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which of the following statement are true?
Strings....
are enclosed by single quotation marks only
are enclosed by double quotation marks only
Can include letters, digits, special characters, and spaces
can include letters, digits, special characters, but not spaces
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Select the correct output of the following String operations
strOne = str("pynative")
strTwo = "pynative"
print(strOne == strTwo)
print(strOne is strTwo)
False False
True True
True False
False True
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following string operations?
str = "My salary is 7000";
print(str.isalnum())
True
False
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which method should I use to convert String "welcome to the beautiful world of python" to "Welcome To The Beautiful World Of Python"
capitalize()
title()
upper()
lower()
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
str1 = "My salary is 7000";
str2 = "7000"
print(str1.isdigit())
print(str2.isdigit())
False
True
False
False
True
False
True
True
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Guess the correct output of the following code.
str1 = "PYnative"
print(str1[1:4], str1[:5], str1[4:], str1[0:-1], str1[:-1])
PYn PYnat ive PYnativ vitanYP
Yna PYnat tive PYnativ vitanYP
Yna PYnat tive PYnativ PYnativ
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Select the correct output of the following String operations
str = "my name is James bond";
print (str.capitalize())
My Name Is James Bond
TypeError: unsupported operand type(s) for * or pow(): 'str' and 'int'
My name is james bond
mY NAME IS JAMES BOND
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
9 questions
4.2.1 Collegamento alla domanda e disaccoppiamento
Quiz
•
Professional Development
6 questions
Wise Eyes
Quiz
•
Professional Development
6 questions
Estratehiya sa Pagtuturo ng Panitikan
Quiz
•
Professional Development
6 questions
Ethics Experiments Statistics
Quiz
•
University - Professi...
10 questions
KEMOTERAPI
Quiz
•
Professional Development
12 questions
PJ - Mayo 2023
Quiz
•
Professional Development
14 questions
2.3-4-5 Calling a (non-)Void Method (with Parameters)
Quiz
•
Professional Development
10 questions
Quality in Education Quiz Ofsted Ifate and OfS
Quiz
•
Professional Development
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Education
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...
