Show Menu
Cheatography

Jittanun Cheat Sheet by

Python Function

print()
Display an inform­­ation on the screen
int()
Change number to an integer
float()
Change number to an decimal number
input()
Ask for the inform­­ation from the user
str()
A list of number, letter and symbols
len()
Length of the string
#
Comment
 

Python Operations

==
equal to
!=
no equal to
<
less than
>
more than
<=
less than or equal
%
calculate for remainder
+
add
-
substract
*
multip­lic­ation
/
division
**
exponent
good luck with python!
 

Example

Print (2) – integer
Print (2.5) – floating point
Print (“Hello”) – string
Print (mystr) – variable
Print (mystr­,”H­i”,­2,1.0) -- commas

mystr = “Hi”
mystr ← name
“Hi” ← value can change
 

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.