Terms Flashcards
(39 cards)
What command will output what is in parenthesis?
print()
What command will output what is in parenthesis as an integer?
int()
What is the term for any decimal number?
float
What command will output what is in parenthesis as a float?
float()
What is the term for text?
string
What command will output what is in parenthesis as a string?
str()
What is the mathematical symbol for division?
/
What is the mathematical symbol for the remainder?
%
What is the mathematical symbol for exponents?
**
What is a comment?
any code that is ignored and does not affect the output
What symbol is placed in front of code that makes it a comment?
#
What is a term that is created and defined?
variable
What is a function?
A function is a section of code that is defined and can be called for later use under one command
How do you format the start of a function?
def functionName():
Everything in a function must be what?
indented
What is another way to say the instructions or set of commands for your function?
the function logic
How do you output a function?
Call it with the format functionName()
What are function parameters?
values or variables that are placed in the parenthesis of the function and must be defined before calling them
Where are function parameters placed?
def functionName(here):
When placing values to the function parameters, where are the values placed?
functionName(here)
returning a function is what?
getting a value back
you can update a variable in the same code because?
code is read from top to bottom
Why are functions useful?
you can use it over and over without having to copy and paste large sections of code
The order of the function parameters match what?
the order of the value