Cheatography
https://cheatography.com
Vocabulary
float |
number including all the decimal |
str |
string |
len |
length |
(==) Double Equal |
test if the 2 value are the same |
!= |
not equal |
int (Integer) |
A thing complete in itself |
Elif |
else/if |
variable |
holds a value and can be changed |
"" |
square the number |
# |
comment |
= |
assigns the value on the right to a variable on the left |
list |
contain many words |
Function
print() |
displays information on the screen |
input() |
receives information from the user |
int() |
converts a value to an integer |
str() |
A list of number, letter and symbols |
len() |
The length of the string. |
|
|
Addition
string + string |
combine together |
string + number |
crash |
number + number |
math - addition |
number - number |
math - substraction |
number*number |
math - multiplication |
number/number |
math - division |
number**number |
math - exponent |
number%number |
finding a remainder |
bolean |
true/false |
# |
single-line comment |
"""" |
multi-line comment |
Code
name = 'Cheraim' |
print (name. upper()) |
print (name. lower()) |
print (name. capitalize()) |
print (name. title()) |
|
CHERAIM |
cheraim |
Cheraim |
|
|
Math
== |
equal to |
!= |
not equal to |
> |
less than |
< |
more than |
<= |
less than or equal |
>= |
more than or equal |
% |
modulo, find the remainder |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment