
AQA String Manipulation
Presentation
•
Computers
•
10th Grade
•
Practice Problem
•
Easy
Roy Duguid
Used 5+ times
FREE Resource
26 Slides • 14 Questions
1
String Manipulation
2
3
4
5
6
7
8
9
10
11
12
String Concatenation
The + operator does not just add two numbers
It can also “add” two strings
The process of combining two strings is called string concatenation
Performing string concatenation creates a brand new string comprised of the first string’s contents followed by the second string’s contents
13
14
String Concatenation
The + operator does not just add two numbers
It can also “add” two strings
The process of combining two strings is called string concatenation
Performing string concatenation creates a brand new string comprised of the first string’s contents followed by the second string’s contents
Concatenation does not include spaces between the strings!
15
Finding position
16
Casting
There may be times when you want to specify a type on to a variable. This can be done with casting.
int() - constructs an integer number from an integer literal, a float literal (by removing all decimals), or a string literal (providing the string represents a whole number)
float() - constructs a float number from an integer literal, a float literal or a string literal (providing the string represents a float or an integer)
str() - constructs a string from a wide variety of data types, including strings, integer literals and float literals
17
Multiple Choice
What is concatenation in python?
18
Multiple Choice
What is casting in python?
19
Multiple Choice
What is a substring / slicing in python?
20
Python - String Length example
21
Multiple Choice
What will the output of this code be?
5
7
22
Concatenation
23
Multiple Choice
what do we call what is happening on line 4?
concatenation
interpolation
24
Multiple Choice
What will output from this code?
25
Multiple Choice
What will output from this code?
26
Casting
27
28
29
30
Checking if a string is all digits
31
Convert character to character code + convert character code to character
32
Substring / Slicing
33
Multiple Choice
Which will change the python input to lower case?
34
Multiple Choice
Which will change the python input to upper case?
35
Multiple Choice
The pseudocode below assigns two strings to two variables:
title = "computer science"
level = "gcse"
What is title[0]?
'c'
'o'
'g'
An error
36
Multiple Choice
The pseudocode below assigns two strings to two variables:
title = "computer science"
level = "gcse"
What is title[4]?
'p'
'u'
't'
An error
37
Multiple Choice
The pseudocode below assigns two strings to two variables:
title = "computer science"
level = "gcse"
What is level concatenated (linked together) with title?
"gcsecomputer science"
"gcse computer science"
"gcsecomputerscience"
An error
38
Multiple Choice
What is will the output be of this code?
39
Multiple Choice
What will the output of this code be?
40
Teams > Activity 1
String Manipulation
Show answer
Auto Play
Slide 1 / 40
SLIDE
Similar Resources on Wayground
38 questions
Input, Integers and Debugging
Presentation
•
9th - 10th Grade
35 questions
Ôn tập HK 2
Presentation
•
10th Grade
35 questions
IGCSE: Theory (Cover)
Presentation
•
10th Grade
36 questions
ANALISIS DATA INFORMATIKA 10 _SMA
Presentation
•
10th Grade
31 questions
Cell terms part 2 - 2023
Presentation
•
10th Grade
39 questions
embedded systems
Presentation
•
10th Grade
32 questions
ASCII
Presentation
•
9th - 10th Grade
37 questions
Human Impact Biology Lesson
Presentation
•
9th Grade
Popular Resources on Wayground
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
10 questions
Identify Fractions, Mixed Numbers & Improper Fractions
Quiz
•
3rd - 4th Grade
Discover more resources for Computers
10 questions
Fact Check Ice Breaker: Two truths and a lie
Quiz
•
5th - 12th Grade
10 questions
Video Games
Quiz
•
6th - 12th Grade
10 questions
Test Your Knowledge with 15 Fun Trivia Questions
Interactive video
•
6th - 10th Grade
15 questions
Memorial Day Trivia
Quiz
•
KG - 12th Grade
12 questions
Name that Candy
Quiz
•
KG - 12th Grade
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
30 questions
K/H Final Review Part 1
Quiz
•
9th - 12th Grade
40 questions
NCFE Earth and Environmental Science Released Test
Quiz
•
9th - 12th Grade