Python Vocabulary Flashcards
(37 cards)
argument
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)
bug
a piece of code that is causing a program to fail
casting
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”)
commenting
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#
comparative operator
also called logic operators, they allow us to compare data in a program. they include == and >
constant
a number that does not change. it’s good practice to make them in capitals. example: SPEED_OF_LIGHT
data - type
different types of info stored by computer. example: floats, integers, and strings
default
a value given to an argument or variable as a starting point
equals operator
the equal sign is used to assign a value to a variable. example: n=2. this assigns the value 2 to variable n.
escape sequence
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: \
execute
another word meaning run
float
a number data - type that can have a decimal value
function
a reusable piece of code
global variable
a variable that is useable anywhere in a program
hacking
taking some previously written code and rewriting parts to make it do something different
I D E
stands for Integrates Development Environment. I D L E is an example. they are special text editors with useful tools built in for programmers
I D L E
stands for Integrated DeveLopment Environment. this is the I D E that comes with python 3 install
infinite loop
a piece of code that runs forever. this is usually a bad thing
integer
a number data - type that cannot have a decimal value and must be a whole number
interactive mode
this is when we use I D L E to try out snippets of code without saving them
local variable
a variable that is defined inside a function and is only usable inside a function and is only usable inside that function
logical operator
they allow us to compare data in a program. they include == and >
also called comparative operator
loop
a piece of code that keeps repeating until a certain condition is met
mathematical operator
an operator that preforms some mathematical function on some numbers e.g. multiplication or addition