Back to marketplace

2.2.3 - Additional programming techniques

No description yet. This curated deck is ready for daily study.

Total cards: 18•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (18)

#1
Front (Question)

what does .length or len() do

Back (Answer)

Returns the length of the string

#2
Front (Question)

How to convert the whole string to uppercase or lowercase

Back (Answer)

.upper() and .lower()

#3
Front (Question)

What is concatenation and how is it done

Back (Answer)

• Joining two separate strings together • Done using the “+” symbol

#4
Front (Question)

What does string[x:i] do

Back (Answer)

• Returns part of a string • x represents the starting character • i represents the end of the string (non-inclusive

#5
Front (Question)

What do .left(x) or .right(x) do

Back (Answer)

Returns the leftmost or rightmost character from a string The number in the brackets shows how many characters to return

#6
Front (Question)

String commands to convert between ASCII and characters

Back (Answer)

• ASC() • CHR()

#7
Front (Question)

what is a record in a database

Back (Answer)

Type of data structure that stores all of the data relating to one entity in a database

#8
Front (Question)

What is a database and why is it used

Back (Answer)

• A method to store data in an organised way (fixed structure) • This allows easy finding and retrieval of the data needed • It also allows multiple data types to be stored in the same record

#9
Front (Question)

How to recognise attributes and records in a database table

Back (Answer)

• Records are the rows • Attributes are the columns

#10
Front (Question)

The 3 SQL commands in the order you have to use them

Back (Answer)

• SELECT (fields) • FROM (database table) • WHERE (criteria)

#11
Front (Question)

What does the wildcard * do in SQL

Back (Answer)

• SELECTs all fields

#12
Front (Question)

What does the wildcard % do in SQL USED WITH LIKE

Back (Answer)

• Finds all records with characters like the example criteria E.g. WHERE (criteria) LIKE “S%” finds all records beginning with S

#13
Front (Question)

What are subprograms and the different types of subprograms

Back (Answer)

• Small programs within a larger program that performs a specific task to produce structured code • Procedure - performs a task and when it is done, the program continues where it left off • Function - performs a task, maniuplates data and returns it back to the main program

#14
Front (Question)

Advantages of subprograms

Back (Answer)

• Saves time - can be saved as separate modules and used in other programs • Small so easy to write, test and debug • Shorter programs - can be called multiple times and only has to be written once

#15
Front (Question)

What is a global variable

Back (Answer)

Has a scope of the whole program. Is declared outside of a subprogram and in python, has to be declared before it is used in a subprogram

#16
Front (Question)

What is a local variable

Back (Answer)

A variable that is declared in a subprogram and its use is confined to that subprogram

#17
Front (Question)

What is an array

Back (Answer)

A static data structure that stores a number of related data items together in the same memory space (contiguous)

#18
Front (Question)

Why are arrays used?

Back (Answer)

• Allows for storage of more than one item of data under one identifier which reduces the need for variables • This makes the code shorter and therefore easy to debug or test