Cheatography
https://cheatography.com
Functioninput() | Ask for information from user. | print() | Show information that we want on the scree. | int() | Change number to be number integer. | float() | Change number to be decimal. | str() | String. A list of number, letter, and symbol. |
Math== | equal to | != | not equal to | < | less than | > | more than | <= | less than or equal to | >= | more than or equal to |
mylistmylist = range(5)
mylist = [0, 1, 2, 3, 4]
| | AdditionStr + Str | Combine together. Like "1" + "2" = 12 | Str + number | Crash | Number + Number | Sum, addition |
Subtractionstr - number | crash | str - str | crash | number - number | Subtract |
Divisionstr / str | crash | str / number | crash | number / number | division |
Multiplicationstr * number | combine that string. "6" * 2 = '66' | str * str | crash | number * number | multiply | str ** str | crash | number ** number | exponent, power | str ** number | crash |
| | VocabVariable | Something that can change | String | a list of character like number, letter and symbols. | Integer Number | Whole number or Counting number | Float Number | The number into decimal number | Syntax | Structure of language | Loop | while | Input | Gain information from user | Print | Show information that we want on the screen. |
Randomrandom.choice() | random word in the list. need to put 'import random' at the top first. |
True and Falsey = true
print (not y or 2<3)
not true or 2<3
False or True
True
True or anything == True
False or anything == False
|
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment