Introducing Python Strings

Quiz
•
Computers
•
11th Grade
•
Hard
Harmeet Kaur
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What is the index of the first character in a string?
5
-1
1
0
2.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
How do you access the last character of a string named 'text'?
text[-1]
text[length]
text.last()
text.charAt(-1)
3.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
Is a string in Python mutable or immutable?
immutable
modifiable
variable
mutable
4.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What will be the output of 'hello'[1:4]?
ell
hel
lo
hello
5.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
How can you find the length of a string in Python?
len(your_string)
length(your_string)
your_string.length()
string.length(your_string)
6.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
What does the method 'str.upper()' do to a string?
It removes all whitespace from the string.
It converts all characters in the string to lowercase.
It converts all characters in the string to uppercase.
It reverses the order of characters in the string.
7.
MULTIPLE CHOICE QUESTION
10 sec • 1 pt
If 's = "Python"', what is 's[0:2]'?
Pyth
on
Py
Python
Create a free account and access millions of resources
Similar Resources on Wayground
5 questions
CodeHS 2.15 Strings

Quiz
•
9th - 12th Grade
10 questions
10 CS // Pseudocode

Quiz
•
9th - 11th Grade
14 questions
Y13 Regular expressions

Quiz
•
11th - 12th Grade
15 questions
AQA Computer Science GCSE - 3.1 Fundamentals of algorithms

Quiz
•
10th - 12th Grade
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
15 questions
ASK F2 -KOD ARAHAN (PYTHON)

Quiz
•
1st Grade - University
15 questions
Python Programming Random Quiz

Quiz
•
11th Grade
15 questions
coding

Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
12 questions
Unit Zero lesson 2 cafeteria

Lesson
•
9th - 12th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
20 questions
Lab Safety and Equipment

Quiz
•
8th Grade
13 questions
25-26 Behavior Expectations Matrix

Quiz
•
9th - 12th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade