1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
output command
print(“hello world”)
string
a long chain of text that is displayed, data type
integer
int
a whole number, data type
float
float
decimal
syntax
rules that determine the way instructions or commands must follow
variable
named spaces in the memory where data can be stored
variable command
myName =
camel case
each word beginning with a capital letter to make things more obvious
python file type
.py
comments command
#
the python interpreter ignores it, for human interpretation
addition command
+
subtraction command
-
multiplication command
*
division command
/
remainder command
%
19%3 =1
exponent command(square)
**
2 ** 3 = 8
equal to
==
less than
<
greater than
>
less than or equal to
<=
greater than or equal to
>=
inequal to
!=
iteration
to loop/ repeat
saves you from writing code repetitively
e.g. while loop
sequence
order of instructions
selection
when the interpreter makes a choice
e.g. if/else statements rely on the input
while loop command
while
keeps going if number of repetition is unknown
for loop command
for
when one knows the number of time the loop should repeat for
for loop_counter in range(10):
casting
conversion of a variable from one data type to another
function
a named block that can perform an action whenever it is called
function command
def function()
to call it, simply write the name of the function.
e.g. function()