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
Q

Method Statement

A

A statement that runs a method

26
Q

Control Flow

A

The order that statements are ran

27
Q

Expression

A

A piece of code that resolves to some value. Consists of operators and operands

28
Q

Operator

A

Indicate what operation is to be performed ie (+, -, /)

29
Q

Operand

A

The numbers (or other vlaues) on which we want to perform the operations

30
Q

Parameter

A

A variable that is in the first line of a function

31
Q

Scope

A

The part of the code for which a variable is defined

32
Q

Local Scope

A

Variable defined inside a function only

33
Q

Global Scope

A

Variable defined outside of a function, can be used anywhere

34
Q

Equality Operator (= =)

A

Compares two things to see if they are equal

35
Q

If Statement

A

Checks to see if a condition is true. If it is than code under if statement will run.

36
Q

If / Else Statement

A

If condition is true, than code under if line will run. If condition is false, than code under the else line will run.

37
Q

Modulo Operator (%)

A

Divides one number by another, and then gives the remainder of that division. Creates a repeating pattern.

38
Q

Return Statement

A

Any value that we have inside of a function, from a local variable, we could return to the code that called that function

39
Q

Deterministic Program

A

A program that always produces the same output for a given input

40
Q

Random Module

A

Random.choice(), random.randit() Must be imported

41
Q

a == b

A

Is a equal to b

42
Q

a < b

A

Is a less than b

43
Q

a > b

A

Is a greater than b

44
Q

a <= b

A

is a less than or equal to b

45
Q

a >= b

A

is a greater than or equal to b

46
Q

a != b

A

is a NOT equal to b

47
Q
A