Introdcution to Python Flashcards

1
Q

Program

A

Set of instructions for a computer to follow

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

Assignment Statement

A

Places an object in memory

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

Variable

A

A connection between a name in the code and some data in the computer’s memory.

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

Object

A

Data that is assigned to a variable

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

String

A

A string of characters, written inside quotes

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

Integer

A

A whole number with no fraction or decimal part

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

List

A

Square brackets with commas

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

Module

A

A file that has a collection of useful code that can be used in other python programs

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

Method

A

A named block of code that can be called to do something

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

Import Statement

A

Importing a module

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

Method Call

A

Calling a method from within a module

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

Syntax Errors

A

When you write something that doesn’t make sense in the grammar of the language

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

Usage Errors

A

When you ask the computer to do something that doesn’t make sense.

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

Logic Errors

A

What you wrote isn’t what you meant

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

Function

A

Named blocks of code that doesn’t run until we till it to, core of every programmer’s work

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

Statements

A

A piece of code that provides complete instructions for some action

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

Simple Statement

A

Statements that don’t contain any other statements inside of them (import turtle)

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

Compound Statement

A

A compound statement contains other statements inside of it

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

Conditional Statements

A

Code that can do something different depending on the value of a given condition. Tells Python to run some code only when a certain condition is true.

20
Q

Function Call

A

A statement that makes a function run

21
Q

Passing

A

Giving input to a function

22
Q

Argument

A

The information being passed to a function

23
Q

Method

A

A function that is associated with an object (special function)

24
Q

Call Statement

A

A statement that when it is run, executes a block of code. Provides input

25
Method Statement
A statement that runs a method
26
Control Flow
The order that statements are ran
27
Expression
A piece of code that resolves to some value. Consists of operators and operands
28
Operator
Indicate what operation is to be performed ie (+, -, /)
29
Operand
The numbers (or other vlaues) on which we want to perform the operations
30
Parameter
A variable that is in the first line of a function
31
Scope
The part of the code for which a variable is defined
32
Local Scope
Variable defined inside a function only
33
Global Scope
Variable defined outside of a function, can be used anywhere
34
Equality Operator (= =)
Compares two things to see if they are equal
35
If Statement
Checks to see if a condition is true. If it is than code under if statement will run.
36
If / Else Statement
If condition is true, than code under if line will run. If condition is false, than code under the else line will run.
37
Modulo Operator (%)
Divides one number by another, and then gives the remainder of that division. Creates a repeating pattern.
38
Return Statement
Any value that we have inside of a function, from a local variable, we could return to the code that called that function
39
Deterministic Program
A program that always produces the same output for a given input
40
Random Module
Random.choice(), random.randit() Must be imported
41
a == b
Is a equal to b
42
a < b
Is a less than b
43
a > b
Is a greater than b
44
a <= b
is a less than or equal to b
45
a >= b
is a greater than or equal to b
46
a != b
is a NOT equal to b
47