Cheatography
https://cheatography.com
Function
# |
Comment, nothing happen |
" " |
Multi line comment |
print ( ) |
Print an information that you want |
Int ( ) |
Change number to be number integer |
input ( ) |
Want the user to type something in |
str ( ) |
Converts the value to a string |
float ( ) |
Converts the value to a floating (Decimal number) |
len ( ) |
Length of string |
|
|
Vocab
String |
Word, symbol |
Floating |
Decimal number |
Integer |
Number |
Datetime |
Date |
Boolean |
True/ False |
Capital
Name = "bright JIRAYU" |
print (name.upper()) |
= BRIGHT JIRAYU |
print (name.lower()) |
= bright jirayu |
print (name.capitalize()) |
= Bright jirayu |
print (name.title()) |
= Bright Jirayu |
Addition
string + string |
Combine together |
string + number |
Fail |
number + number |
Plus |
number - number |
Minus |
|
|
Symbols
== |
Equal to |
!= |
Not equal to |
< |
Less than |
<= |
Less than or equal to |
> |
Greater than |
>= |
Greater than or equal to |
+ |
Add |
- |
Subtract |
* |
Multiple |
/ |
Divide and quotient is flaot |
// |
Divide and quotient is integer |
** |
Exponent |
% |
Modulo and remainder |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment