
List and string methods
Presentation
•
Science, Computers, Education
•
11th - 12th Grade
•
Medium
Akniyet Sarsenbek
Used 5+ times
FREE Resource
17 Slides • 15 Questions
1
By Akniyet Sarsenbek
2
11.2.2.3apply functions and string processing methods;
11.2.3.3apply functions and methods of processing lists;
11.4.3.2 solve applied problems of various subject areas;
Some text here about the topic of discussion
3
Multiple Choice
String revision QUIZ
Use the len method to print the length of the string.
x = "Hello World"
len.x
print(len(x))
x.len()
print(len)
4
Multiple Choice
Get the first character of the string txt.
txt = "Hello World"
x =
txt(1)
txt(0)
txt[0]
txt[1]
5
Multiple Choice
Get the characters from index 2 to index 4 (llo).
txt = "Hello World"
x =
txt[2 : 5]
txt[2 : 4]
txt[2 : 6]
txt[1 : 5]
6
Multiple Choice
What does the following Python Program print out?
Hello
there
0
Hellothere
Hello
7
Multiple Choice
What does the following Python program print out?
x2
int402
402
42
8
Multiple Choice
How would you use the index operator [] to print out the letter q from the following string?
x = 'From marquard@uct.ac.za'
print(x[q])
print(x[8])
print(x[9])
print(x[7])
9
Multiple Choice
How would you use string slicing [:] to print out 'uct' from the following string?
x = 'From marquard@uct.ac.za'
print(x[14:3])
print(x[14:17])
print(x[15:18])
print(x[14/17])
10
Multiple Choice
What does the following Python code print out?
banana7
42
-1
banana banana banana banana banana banana banana
11
count() method
Return the number of times the value "apple" appears in the string:
txt = "I love apples, apple are my favorite fruit"
x = txt.count("apple")
print(x)
Some text here about the topic of discussion
12
find() method
The find() method finds the first occurrence of the specified value.
The find() method returns -1 if the value is not found.
txt = "Hello, welcome to my world."
x = txt.find("welcome")
print(x)
Subject | Subject
Some text here about the topic of discussion
13
index() method
The index() method finds the first occurrence of the specified value.
The index() method raises an exception if the value is not found.
The index() method is almost the same as the find() method, the only difference is that the find() method returns -1 if the value is not found.
txt = "Hello, welcome to my world."
x = txt.index("welcome")
print(x)
Subject | Subject
Some text here about the topic of discussion
14
replace() method
The replace() method replaces a specified phrase with another specified phrase.
txt = "I like bananas"
x = txt.replace("bananas", "apples")
print(x)
Subject | Subject
Some text here about the topic of discussion
15
split() method
The split() method splits a string into a list.
You can specify the separator, default separator is any whitespace.
txt = "welcome to the jungle"
x = txt.split()
print(x)
Subject | Subject
Some text here about the topic of discussion
16
upper() method
The upper() method returns a string where all characters are in upper case.
Symbols and Numbers are ignored.
txt = "Hello my friends"
x = txt.upper()
print(x)
Subject | Subject
Some text here about the topic of discussion
17
lower() method
The lower() method returns a string where all characters are lower case.
Symbols and Numbers are ignored.
txt = "Hello my FRIENDS"
x = txt.lower()
print(x)
Subject | Subject
Some text here about the topic of discussion
18
format() method
The format() method formats the specified value(s) and insert them inside the string's placeholder. The placeholder is defined using curly brackets: {}.The format() method returns the formatted string.
txt = "For only {price} dollars!"
print(txt.format(price = 49))
Subject | Subject
Some text here about the topic of discussion
19
strip() method
The strip() method removes any leading (spaces at the beginning) and trailing (spaces at the end) characters (space is the default leading character to remove)
txt = " banana "
x = txt.strip()
print("of all fruits", x, "is my favorite")
Subject | Subject
Some text here about the topic of discussion
20
Some text here about the topic of discussion
21
Fill in the Blanks
Return the string without any whitespace at the beginning or the end.
Type answer...
22
Fill in the Blanks
Convert the value of txt to upper case.
Type answer...
23
Fill in the Blanks
Convert the value of txt to lower case.
Type answer...
24
Fill in the Blanks
Replace the character H with a J. Write the needed words with spaces.
Type answer...
25
Fill in the Blanks
Insert the correct syntax to add a placeholder for the age parameter.
Type answer...
26
Multiple Choice
Which of the following is not a valid string method in Python?
upper()
lower()
middle()
strip()
27
Some text here about the topic of discussion
28
29
30

Python | Check if a given string is binary string or not - GeeksforGeeks
You can open this webpage in a new tab.
31
Open Ended
Ask any questions.
32
By Akniyet Sarsenbek
Show answer
Auto Play
Slide 1 / 32
SLIDE
Similar Resources on Wayground
22 questions
Organizing Literary Analysis Writing
Presentation
•
11th Grade
25 questions
KESTABILAN DAN KEKUATAN OBJEK
Presentation
•
11th - 12th Grade
25 questions
2 Notes: Post Mortem Stages & Decomposition
Presentation
•
11th Grade
26 questions
Circuits and Symbols
Presentation
•
9th - 12th Grade
24 questions
Matrices Review
Presentation
•
11th - 12th Grade
26 questions
Electric Charge (6.1 PS)
Presentation
•
11th - 12th Grade
24 questions
Motion Graph Lesson
Presentation
•
11th - 12th Grade
28 questions
Solubility Curves
Presentation
•
10th - 12th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade
Discover more resources for Science
14 questions
Periodic Trends
Interactive video
•
11th Grade
7 questions
Newton's Laws Video Quiz
Interactive video
•
9th - 12th Grade
35 questions
Cell Transport/Enzyme/Cell/Macro Review
Quiz
•
9th - 12th Grade
13 questions
Explore Enzyme Functions and Interactions
Quiz
•
9th - 12th Grade
10 questions
Fact or Fiction: Microbes
Quiz
•
9th - 12th Grade
10 questions
Understand Cell Functions and Organelles
Quiz
•
9th - 12th Grade
20 questions
BIOGEOCHEMICAL CYCLES
Quiz
•
10th - 11th Grade
19 questions
Explore Macromolecules in Living Organisms
Quiz
•
9th - 12th Grade