Python Flashcards
Computational Thinking
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.
Translation/Porting
The act of converting a codedprogram into a different programming language.
Why would a code be translated/ported?
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
What are the benefits of code translation?
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.
What are the drawbacks of code translation?
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.
What are the impacts and implications of code translation on users?
The program may function differently, there may be a lack of bug fixes, they may prefer the old version
What are the impacts and implications of code translation on developers?
Learning new skills, challenges with debugging, dealing with expectations of users/organisations, finding new solutions in the new programming language
What alternatives are there to translating code?
New versions of the current language, identifying performance delays to create improved algorithms, ask other developers to review the code
Insertion Slot
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.
Tuple
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 is a tuple different to a list?
After the tuple is created, it can’t be edited, unlike a list, and uses round brackets rather than square.
Set
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)
2D Array
Displays data in rows and columns so that the data can be sorted and searched for using row major order or column major order
Binary Search
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
Linear Search
Goes through each value in a list of data until the searched value is found or unfound
API
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
Constant
Something that doesn’t change within the code
Pseudocode
A step-by-step description of the code written in English rather than any specific coding language
Boolean Operators
Commands that are either true or false
Logical Operators
Used to combine boolean statements, including and, or, and not
ELIF
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
Validation
A method of forcing the user to complete a required action accurately
While Loop
Something that is looped throughout a code while a specified action is being carried out
Function
Something defined earlier in the code that you can call on to be executed