All Python From 1 To 23 Flashcards
#
octophorne, pound character used to comment out lines
+
Plus
-
Minus
/
Slash- division
*
Asterisk- multiplication character
%
How does it work
Modulus
X devided by Y with J remaining
The result of % is the J part
Less then
>
Greater than
<=
Less then equal
=>
More then equal
PEMDAS
Parenthesis, Exponents, Multiplication, Division, Addition, Subtraction
X**Y
X to the Y power
A//B
// is used to perform floor division. The expression 100//40 will return the value of 2. Floor division is useful when you need a quotient to be in whole numbers
Variable
A name for memory storages of strings, numbers
Between_ beetwen
Underscore character
=
Assigns value on the right to the variable on the left
==
Tests wether two values are equal
f“text and {some car}”
One way of formatting the string
“Something {} “.formatter(“player”)
Another way to format a string
True “and” False
Python recognises
True and False as keywords representing the concept of true and false
“””something
something”””
Allows you to write every place
\
Backslash- \
\’
Single quote - ‘
\”
Double quote - “