important definitions Flashcards

1
Q

What is an algorithm?

A
  • an ordered list of instructions - precise and unambiguous - eventually ends with a correct solution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a module?

A

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.

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

What does DDIT stand for?

A

Define, Design, Implement & Test

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

What is an IPO Chart?

A

An IPO chart helps organize our thinking so we don’t get confused (brainstorming). It consists of Input, Processing and Output.

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

What is Pseudocode?

A

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.

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

What is a Flow Chart?

A

A flow chart is a visual representation of a algorithm design.

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

What is a Variable?

A

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.

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

What is an Expression?

A

An expression is any piece of code that provides a value.

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

What is a Statement?

A

The smallest complete action of a program, comparable to a sentence.

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

What is a Literal?

A

A literal is a value that is explicitly defined in your source code.

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

What is a Trace?

A

A trace is a table written with the history of all values of a specific algorithm. Like the results of a test.

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

What is String?

A

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.

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

What are Data Types?

A

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)

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

What are operators?

A

Operators are symbols that represent functions. eg. +, -, *.

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

What is String Concatenation?

A

A string concatenation uses the plus sign (+) to join strings together.

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

What is Precedence?

A

Precedence is commonly referred to as “order of operations” eg. bedmas

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

What is an Arithmetic Operator?

A

Operators that work with numbers.

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

What is the Integer Division Operator?

A

The Integer Division Operator is the whole number in an answer to long division.

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

What is the Modulo Operator?

A

The Modulo Operator is the remainder in an answer to long division.

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

What are Relational Operators?

A

Relational Operators compare two values to give a True or False statement.

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

What is a Boolean Operator?

A

The boolean operators are AND, OR, NOT.

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

What is the Precedence of Boolean Operators?

A

NOT, AND, OR - Highest to Lowest

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

What are String Operators?

A

Operators that are used to make changes to the string datatype.

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

What is the Precedence between operator groups?

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

What is an IF statement?

A

Simply a statement that states “IF this THEN that”.

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

What is an ELSE statement?

A

An else statement comes into play when the IF statement came back false then everything ELSE does THIS.

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

What is an ELIF statement?

A

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.

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

What is a WHILE Loop?

A

The While loop is a fundamental structure what repeats the loop while these conditions are met and only when these conditions are met.

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

What is a Sentinel Value?

A

Sentinel Values are values which cause the loop to exit and are often hinted at to the user in an input prompt.

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

What are Boolean Flags?

A

Boolean Flags are variable which hold the result of a more complicated expression and should be used to clarify code or to reduce calculations.

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

What is a FOR Loop?

A

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.

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

What is a Function?

A

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.

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

What is Associativity?

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

What is a Parameter?

A

The variables that a function accepts are called parameters. In our example animalName and animalSound are parameters.

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

What is an Argument?

A

An argument is a specific value like “a cow” and “moo” and are substituted into the parameters.

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

What is Variable Scope?

A

Variable scope refers to being able to access a variable from a particular part of code.

37
Q

What is a Method?

A

A method is a programmed procedure that is defined as part of a class and included in any object.

38
Q

What is a range?

A

The difference of the beginning and ending character.

39
Q

What does Consistent Data mean?

A
40
Q

What is a program?

A

A program is a set of instructions.

41
Q

What is a Bug?

A

A bug is an execution a program has processed where the program told the computer to do something it couldn’t.

42
Q

What are Parentheses?

A

(Parentheses)

used to segregate expressions, placement for arguments for functions

43
Q

What are Brackets?

A

[Brackets]

used to create strings, use methods like string slice

44
Q

What are Braces or Curly Brackets?

A

{Braces}

45
Q

What is an Assign statement?

A

x = 124654 (the = sign is assigning the number value to x)

46
Q

What is a Syntax Error?

A

Syntax Errors happen when you type something that isn’t valid Python code.

47
Q

What is a Semantic Error?

A

A Semantic Error happens when you tell Python to do something that it just can’t do, like divide a number y zero or try to use a variable that doesnt exist.

48
Q

What does the help function do?

A

The Help Function shows documentation for any function.

49
Q

What is a Memory Address?

A

Python keeps track of each value in a separate object and each object has a memory address. You can find the actual memory address of an object by using the built in function id:

50
Q

What is a Function Definition?

A

A Function Definition tells Python what to do when that function is called.

51
Q

What are Keywords?

A

Keywords are words that Python reserves for its own use. We can’t use them except as Python intends. Two of them are (def) and (return). If we try to use them as variables or functions Python produces an error.

52
Q

What is a Function Header?

A

The function header is the first line of the function and starts with a “def”, followed by the name of the function, then a comma-separated list of parameters within parentheses, and then a colon.

53
Q

What is a Local Variable?

A

Local variables get created each time that a function is called, and they are erased when the function returns. Because they only exist when the function is being executed, they can’t be used ourside of the function. Trying to access the local variable from outside the function is an error, the same error as never defining a variable in the first place.

54
Q

What is a namespace?

A

A Space for Names

55
Q

What is concatenation?

A
56
Q

What is the repetition string operator?

A
57
Q

What is a substring slice?

A
58
Q

What is the membership string operator?

A
59
Q

What does the tring method lower() do?

A

converts a string to lower case

60
Q

what does the string method upper() do?

A

converts a string to upper case

61
Q

what does the string method isalpha() do?

A

asks if the string is letters only?

62
Q

what does the string method isdecimal() do?

A

checks if the string is all numbers

63
Q

what does the string method islower() do?

A

checks if the string is all lowercase

64
Q

what does the string method isspace() do?

A

checks if the string is spaces only

65
Q

what does the string method isupper() do?

A

check if the string is all uppercase

66
Q

what is data validation?

A
67
Q

how to ranges work?

A
68
Q

What is the ASCII table?

A

The ASCII table is a list of symbols in order of value from lowest to highest.

69
Q

what does completion mean?

A
70
Q

What does consistent data mean?

A
71
Q

What are lists?

A
72
Q

what is the index value in a list?

A
73
Q

what is the data value in a list?

A
74
Q

what is an element is a list?

A

a list item

75
Q

what is the join list operator?

A
76
Q

what is the repeat list operator?

A
77
Q

what is the existance list operator?

A
78
Q

whats is the slice list operator?

A
79
Q

what is the len() function for lists?

A
80
Q

what is the min() function in a list?

A
81
Q

what is the max() function in a list?

A
82
Q

what is the .reverse() method in a list?

A
83
Q

what is the .sort() method for lists?

A
84
Q

what is a boxframe?

A
85
Q

what is a docstring?

A
86
Q

what is the escape sequence?

A
87
Q

What is a short-circuit evaluation?

A

When Python evaluates an expression containing and or or, it does so from left to right. As soon as it knows enough to stop evaluating, it stops, even if some operands haven’t been looked at yet. This is called short-circuit evaluation.

In an or expression, if the first operand is True, we know that the expression is True. Python knows this as well, so it doesn’t even evaluate the second operand. Similarly, in an and expression, if the first operand is False, we know that the expression is False. Python knows this as well, and the second operand isn’t evaluated.

88
Q

What is the import function?

A