
AQA String Manipulation
Presentation
•
Computers
•
10th Grade
•
Practice Problem
•
Easy
Roy Duguid
Used 5+ times
FREE Resource
26 Slides • 14 Questions
1
2
3
4
5
6
7
8
9
10
11
12
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
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
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
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
27
28
29
30
31
32
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
Show answer
Auto Play
Slide 1 / 40
SLIDE
Similar Resources on Wayground
36 questions
Wildseed Ch 2
Presentation
•
10th Grade
32 questions
Pengenalan AI
Presentation
•
10th Grade
31 questions
GCSE Comp Sci Lesson 1 - Intro
Presentation
•
9th Grade
40 questions
Newton's Third Law
Presentation
•
11th Grade
36 questions
Python. Символьные строки. Срезы.
Presentation
•
10th Grade
32 questions
Flowcharts and pseudocode
Presentation
•
10th Grade
32 questions
ITX102 - Information and Processing Part 2
Presentation
•
10th Grade
34 questions
Unit 6 T5 - IDEs Integrated Development Environments
Presentation
•
11th Grade
Popular Resources on Wayground
10 questions
How much do you know about our Portrait of an Eagle?
Quiz
•
10th Grade
10 questions
Fast Food Slogans
Quiz
•
6th - 8th 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
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade
20 questions
[AP CSP] Python Coding: Functions, Parameters, Return
Presentation
•
9th - 12th Grade
40 questions
Introduction to Microsoft Word
Quiz
•
8th - 12th Grade
20 questions
APCS Unit 1A
Quiz
•
9th - 12th Grade
24 questions
Binary
Quiz
•
9th - 12th Grade