Python Flashcards

1
Q

Computational Thinking

A

A method of thinking that analyse problems, break it down into smaller parts, recognise patterns within the problem and find a strategy to solve it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Translation/Porting

A

The act of converting a codedprogram into a different programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why would a code be translated/ported?

A

The programming language is no longer supported/no longer supports the needs of the code
security flaws
newer programming languages
changing policies within the business/organisation
availability of programmers fluent in that programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the benefits of code translation?

A

More modern programming language, it may be easier to update or change, reduced costs and development time, and the new language can assist with functionality of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the drawbacks of code translation?

A

Possibility of an inferior language, the translation may not be exact, it may not be as efficient, it can be time-consuming to port, a lack of developers fluent in the new language, and the chance of less community knowledge to remove bugs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the impacts and implications of code translation on users?

A

The program may function differently, there may be a lack of bug fixes, they may prefer the old version

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the impacts and implications of code translation on developers?

A

Learning new skills, challenges with debugging, dealing with expectations of users/organisations, finding new solutions in the new programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What alternatives are there to translating code?

A

New versions of the current language, identifying performance delays to create improved algorithms, ask other developers to review the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Insertion Slot

A

Compares values in turn, starting with the second value in the list. If this value is greater than the value to the left of it, no changes are made. Otherwise, this value is repeatedly moved left until it meets a value that is less than it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Tuple

A

Tuples are used to store multiple items in a single list that is ordered and unchangeable (immutable). After the tuple is created, it can’t be edited.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How is a tuple different to a list?

A

After the tuple is created, it can’t be edited, unlike a list, and uses round brackets rather than square.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Set

A

Data that can be compared and displayed within curly brackets using unions (all data within multiple sets), intersections (only data that’s in multiple sets) and symmetric difference (data in only one set)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

2D Array

A

Displays data in rows and columns so that the data can be sorted and searched for using row major order or column major order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Binary Search

A

Picks the middle value in a sorted list of data; if the searched value is lower than the middle, it removes the values above the middle; if it’s higher, it discards the values below the middle. It repeats until the searched value is found

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Linear Search

A

Goes through each value in a list of data until the searched value is found or unfound

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

API

A

APIs are mechanisms that enable two software components to communicate with each other using a set of definitions and protocols. The application that sends the request is called the client, and the application that sends the response is called the server

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Constant

A

Something that doesn’t change within the code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Pseudocode

A

A step-by-step description of the code written in English rather than any specific coding language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Boolean Operators

A

Commands that are either true or false

20
Q

Logical Operators

A

Used to combine boolean statements, including and, or, and not

21
Q

ELIF

A

Short for else if, used when you have multiple if statements so that each statement is ran after each other rather than at the same time

22
Q

Validation

A

A method of forcing the user to complete a required action accurately

23
Q

While Loop

A

Something that is looped throughout a code while a specified action is being carried out

24
Q

Function

A

Something defined earlier in the code that you can call on to be executed

25
Function Parameter
The variables that will be called upon later in the code, named within brackets in a function definition
26
Argument
Information sent to a function from a function call
27
Call
Calling on the function to happen in the code
28
Programming Paradigms
Different models of coding including Object-Orientated, Procedural and Event-Driven
29
OR Boolean Operators
Allows you to set multiple conditions that must all be true
30
For Loops
Runs a section of code repeatedly until a condition is met
31
Data Types
Categories of data items that tells what operations can be performed on a particular data e.g. Numeric, Sequence Type, Boolean, Set, Dictionary, Binary Types
32
Data Structure
A collection of data types
33
Identifier
A name for programmers to represent a value stored in the computer's RAM, instead of the memory address, can be a constant or a variable
34
Local Variables
Limited to being used in the block of code in which they are declared, for example within a particular function
35
Global Variables
Can be used anywhere in the code, not just the block where they are declared
36
Snake Case
Variables named with an underline to separate words e.g. user_name
37
Camel Case
Variables named with the first letter of each word capitalised and no spaces e.g. userName
38
Why is BIDMAS important?
Sequences don’t always appear left to right, and calculations may need to made outside of the typical left-to-right order.
39
How do you convert integers to strings?
Put a number inside str()
40
GIGO
“Garbage In, Garbage Out” means that a bad or poor-quality input will result in a bad output.
41
Range Validation
Checking that a number that’s been input is within a certain range of numbers
42
Length Validation
How many characters have been input
43
Presence Validation
Ensuring fields aren’t left empty
44
Type Validation
Ensuring the data type is correct (e.g., integer, float, string)
45
Format Validation
Ensuring the data is in the correct format (e.g., date format, email address)
46
Error Handling
Syntax features designed to handle run-time errors as they occur to avoid programs crashing or locking unresponsively
47