Show Menu
Cheatography

Dada's Python sheet Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Math symbol

==
equal
!=
not equal to
<=
less than or equal to
>=
more than or equal to
%
Modulo/ Find the remainder
/
divide (decimal)
*
multiply
//
divide (integer)
**
exponent

Vocabulary

string
a list of characters (numbers, letters)
Float number
Number with decimal point
Integer number
Counting number
Modulo
Finding the remainder
Syntax
Grammar/ Structure of language
variable
value and can be changed
length
The length of the string
 

Addition

string + number
Fail
number + number
plus
string + string
combine together
number - number
minus

Multip­lic­ation and Exponent

string * number
string­­st­i­n­g...(­­number)
string * string
Fail
string ** string
Fail
number ** number
Exponent
number * number
Multiply
string ** number
Fail

Function

int( )
Converts value to integer
float( )
Converts to decimal point
str( )
Converts value to string
input( )
Receive inform­­ation from user
len( )
The length of the string
s.up­per()
uppercase copy of s
#
Comment
s.lo­wer()
lowercase copy of s
"­­"
Multi-line Comment