important definitions Flashcards
What is an algorithm?
- an ordered list of instructions - precise and unambiguous - eventually ends with a correct solution
What is a module?
A module is a reusable algorithm or group of functions. Having a bunch of functions saved into a .py document is considered a Module that you can import and use those pre built functions for other projects.
What does DDIT stand for?
Define, Design, Implement & Test
What is an IPO Chart?
An IPO chart helps organize our thinking so we don’t get confused (brainstorming). It consists of Input, Processing and Output.
What is Pseudocode?
Pseudo is an algorithm written to solve a problem that is written in a language which is less open to interpretation and English but is also less formal than a programming language.
What is a Flow Chart?
A flow chart is a visual representation of a algorithm design.
What is a Variable?
A variable is the part of a program that can “remember” values. They are boxes in memory that can hold 1 thing at a time.
What is an Expression?
An expression is any piece of code that provides a value.
What is a Statement?
The smallest complete action of a program, comparable to a sentence.
What is a Literal?
A literal is a value that is explicitly defined in your source code.
What is a Trace?
A trace is a table written with the history of all values of a specific algorithm. Like the results of a test.
What is String?
A string is a data type defined as a sequence of characters contained between a pair of quotation marks and can consists of letters, numbers and symbols.
What are Data Types?
Data Types are the different kinds of data we can work with, and include boolean values (true or false), integer numbers (numbers without decimals), real numbers (numbers with decimals), and strings (characters enclosed in quotes)
What are operators?
Operators are symbols that represent functions. eg. +, -, *.
What is String Concatenation?
A string concatenation uses the plus sign (+) to join strings together.
What is Precedence?
Precedence is commonly referred to as “order of operations” eg. bedmas
What is an Arithmetic Operator?
Operators that work with numbers.
What is the Integer Division Operator?
The Integer Division Operator is the whole number in an answer to long division.
What is the Modulo Operator?
The Modulo Operator is the remainder in an answer to long division.
What are Relational Operators?
Relational Operators compare two values to give a True or False statement.
What is a Boolean Operator?
The boolean operators are AND, OR, NOT.
What is the Precedence of Boolean Operators?
NOT, AND, OR - Highest to Lowest
What are String Operators?
Operators that are used to make changes to the string datatype.
What is the Precedence between operator groups?
What is an IF statement?
Simply a statement that states “IF this THEN that”.
What is an ELSE statement?
An else statement comes into play when the IF statement came back false then everything ELSE does THIS.
What is an ELIF statement?
An ELIF is used when there are multiple conditions before resulting in the ELSE Statement. An ELIF Statement is only run if the IF statement returns False, if you want every condition to be looked at every time than you will use multiple IF statements.
What is a WHILE Loop?
The While loop is a fundamental structure what repeats the loop while these conditions are met and only when these conditions are met.
What is a Sentinel Value?
Sentinel Values are values which cause the loop to exit and are often hinted at to the user in an input prompt.
What are Boolean Flags?
Boolean Flags are variable which hold the result of a more complicated expression and should be used to clarify code or to reduce calculations.
What is a FOR Loop?
The FOR Loop is especially useful for working with strings and lists by saying “FOR each character in the string, do something with it” etc.
What is a Function?
A Function is a reusable named section of a program that performs a specific task. In this sense, a function is a type of procedure or routine. There are built in Functions & user defined Functions.
What is Associativity?
What is a Parameter?
The variables that a function accepts are called parameters. In our example animalName and animalSound are parameters.
What is an Argument?
An argument is a specific value like “a cow” and “moo” and are substituted into the parameters.