Cheatography
https://cheatography.com
Functions
print() |
displays information on the screen |
input() |
receives information from the user |
int() |
converts a value to an integer |
Addition
string + string |
combine together |
string + number |
crash |
number + number |
math - addition |
Math Symbol
== |
equal to |
!= |
not equal to |
+ |
plus |
- |
minus |
* |
times |
/ |
divide |
% |
remainder |
** |
power |
< |
less than |
> |
more than |
<= |
less than or equal to |
>= |
more than or equal to |
|
|
Vocabulary
variable |
holds a value and can be changed |
string |
a list of characters such as numbers, letters, symbols |
code
print (name.upper()) |
print (name.lower()) |
print (name.capitalize()) |
print (name.title()) |
|
|
Multiplication and Exponents
string * number |
combine that string multiple times |
string * string |
crash |
number * number |
math - multiply |
string ** string |
crash |
number ** number |
math - exponents |
string ** number |
crash |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment