Python Vocabulary Flashcards

1
Q

argument

A

a piece of information that’s required by a function so it can preform it’s task. usually a string or numbers. example: my_function(argument here)

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

bug

A

a piece of code that is causing a program to fail

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

casting

A

the process of converting one data type into another. example: a number may be stored as text but needs to be an integer. it can be done like this: int(“3”)

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

commenting

A

text in a program that is for human readers. it is ignored by the computer when running the program. i’m python, all comments start with a hash symbol#

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

comparative operator

A

also called logic operators, they allow us to compare data in a program. they include == and >

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

constant

A

a number that does not change. it’s good practice to make them in capitals. example: SPEED_OF_LIGHT

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

data - type

A

different types of info stored by computer. example: floats, integers, and strings

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

default

A

a value given to an argument or variable as a starting point

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

equals operator

A

the equal sign is used to assign a value to a variable. example: n=2. this assigns the value 2 to variable n.

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

escape sequence

A

when characters that have certain meanings in python are required in strings they have to be “escaped” so the computer knows they do not have their usual meaning. this is done by putting a slash in front of them: \

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

execute

A

another word meaning run

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

float

A

a number data - type that can have a decimal value

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

function

A

a reusable piece of code

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

global variable

A

a variable that is useable anywhere in a program

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

hacking

A

taking some previously written code and rewriting parts to make it do something different

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

I D E

A

stands for Integrates Development Environment. I D L E is an example. they are special text editors with useful tools built in for programmers

17
Q

I D L E

A

stands for Integrated DeveLopment Environment. this is the I D E that comes with python 3 install

18
Q

infinite loop

A

a piece of code that runs forever. this is usually a bad thing

19
Q

integer

A

a number data - type that cannot have a decimal value and must be a whole number

20
Q

interactive mode

A

this is when we use I D L E to try out snippets of code without saving them

21
Q

local variable

A

a variable that is defined inside a function and is only usable inside a function and is only usable inside that function

22
Q

logical operator

A

they allow us to compare data in a program. they include == and >
also called comparative operator

23
Q

loop

A

a piece of code that keeps repeating until a certain condition is met

24
Q

mathematical operator

A

an operator that preforms some mathematical function on some numbers e.g. multiplication or addition

25
Q

method

A

the name given to a function in a class

26
Q

module

A

a saved python file whose functions can be used by another program

27
Q

modulus

A

a mathematical operation that is used to return the remainder from a division calculation

28
Q

operator

A

a symbol that performs a simple function on some code such as multiplying two numbers or comparing them to see if they are equal. see also comparative operator and mathematical operator

29
Q

output

A

data that is sent from a program to a screen or printer etc.

30
Q

return

A
  1. the value a function will produce after it has been run (it is also a python keyword) 2. the ‘end of line’ key on a keyboard, sometimes called the enter key
31
Q

script mode

A

this is when we use I D L E to help us write code that we will save in a file

32
Q

statement

A

a piece of code that represents a command or action e.g. a print statement

33
Q

string

A

text data, which can be stored in a variable

34
Q

syntax error

A

an error produced when a computer fails to run a program because it cannot recognize the format of the code supplied, e.g. a syntax error would be produced if a bracket had not been closed

35
Q

tkinter

A

a package of classes that are often imported into python programs that give methods that are useful for producing windows, drawing images, and producing animation

36
Q

variable

A

a name that refers to a place in a computer’s memory where data is stored. more loosely, it can also be used to refer to that data

37
Q

while loop

A

a kind of loop that repeats code while a comparative statement returns TRUE