Save
...
AQA GCSE Computer Science (BBC Bitesize)
Computational thinking and problem solving
Further programming language operations
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Erin Harrod
Visit profile
Cards (106)
What is a string in programming?
A sequence of characters stored as a
variable
View source
What characters can a string include?
Numbers
, letters, and symbols
View source
How is a string represented in code?
Enclosed in
quotes
, e.g., 'Hello'
View source
What is a variable in programming?
A
memory location
where values are stored
View source
What data type can a variable have?
A
string
as its data type
View source
How do you determine the length of a string?
Using the
LEN
function in pseudo-code
View source
What does LEN(wordOne) return if wordOne is "Computer"?
"
eight
"
View source
How do you find a character's position in a string?
Using wordOne[
index
]
notation
View source
What character does wordOne[2] return for "
Computer
"?
"m"
View source
What is a substring?
A
string
of
characters
within another string
View source
How can you extract a substring in pseudo-code?
Use a
loop
to
concatenate
characters
Use the
SUBSTRING
function
Example: SUBSTRING(0, 2, wordOne) gives "Com"
View source
What is concatenation in programming?
Joining together two or more
strings
View source
How do you concatenate strings in pseudo-code?
Using the +
operator
between strings
View source
What is the output of the concatenation of "Bob" and "Smith"?
"
Bob Smith
"
View source
What is casting in programming?
Changing the
data type
of a
variable
View source
How do you convert a string to an integer in Python?
Using int("
54
") returns 54
View source
What does STRING_TO_INT do in pseudo-code?
Converts a string to an
integer
View source
What is the purpose of CHAR_TO_CODE?
Converts
alphanumeric
characters to numerical format
View source
What character set does CHAR_TO_CODE use?
ASCII
or
UNICODE
View source
How does CODE_TO_CHAR function work?
Converts
ASCII
/
UNICODE
to alphanumeric characters
View source
How do you check if a character is between 'a' and 'z'?
Using
CHAR_TO_CODE
for range checking
View source
What does RANDOM_INT(97,122) generate?
A
random number
between
97
and
122
View source
What is the output of "does it contain" + CODE_TO_CHAR(character)?
A question about a
randomly
generated
letter
View source
What is a subroutine in programming?
A portion of code that can be called
anywhere
View source
What is the purpose of a subroutine?
To perform a specific task in a
program
View source
Why are subroutines easier to write and debug?
They are usually
small
in size
View source
How do subroutines contribute to program efficiency?
They allow
code reuse
, making programs shorter
View source
What can subroutines be saved as for future use?
Modules
View source
What is a parameter in computer programming?
A value passed into a
function
or
procedure
View source
How does passing data to a subroutine affect the main program?
It allows the subroutine to be
customized
View source
What types of data can be passed as parameters?
Integers
,
characters
, and Boolean
View source
Why is it beneficial to write code only once for subroutines?
It results in shorter
programs
View source
What are the advantages of using subroutines in programming?
Code
reuse saves time and
effort
Easier to write,
test
, and
debug
Makes programs shorter and more efficient
Enhances readability and understanding
View source
What is the relationship between subroutines and the main program?
Subroutines are smaller sections of code
They can be called multiple times in the main program
They can be saved separately as
modules
They help in organizing code effectively
View source
What are the two types of subroutines?
Procedures
and
functions
View source
What is a procedure in programming?
A
subroutine
that performs a
specific
task
View source
What happens when a procedure completes its task?
The
main program
continues from where it left off
View source
What is an array in programming?
A set of data values of the
same
type
View source
What does the pseudo-code 'FOR count <- 1 TO lines' indicate?
A
loop
that iterates from 1 to lines
View source
What is a local variable?
A variable used in one
specific
section of code
View source
See all 106 cards