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