Show Menu
Cheatography

barbies Cheat Sheet by

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 inform­­ation on the screen
input()
receives inform­­ation 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 - s­ubs­­tra­­ction
number­­*n­umber
math - m­ult­­ipl­­ic­ation
number­­/n­umber
math - d­ivision
number­­**­n­umber
math - e­xponent
number­­%n­umber
finding a remainder
bolean
true/false
#
single­­-line comment
"­"­"­"
multi-line comment

Code

name = 'Cheraim'
print (name. upper())
print (name. lower())
print (name. capita­­li­ze())
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
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.