|
Int (Integers)
|
A thing complete in itself
|
|
Variable
|
Something that can be change
|
|
Elif
|
Else/If
|
|
Float
|
Number including all the decimals
|
|
mynum%2
|
What is the remainder when dividing by 2
|
|
**
|
Square (the number)
|
|
==
|
Equal to...
|
|
!=
|
NOT equal to...
|
|
Decimals in Python...
|
Any decimal in python, it will get rid of all except for the 'floats' command
|
|
" "
|
Anything puts under the quotes, will turn into 'INTEGERS'
|
|
len
|
length (e.g. length of words)
|
|
str
|
String
|
|
String
|
text you want to display to someone, or "export" out of the program you are writing
|
|
List
|
Contains many words
|
|
Input
|
Allow the user to type in/input something
|
|
#
|
Comments only (it does not interfered or have any affect with the commands in the programs)
|
|
user_number = '' while user_number != '0' : user_number = input("Enter a number to convert to binary") number = int(user_number) binary_string = '' while(number>0) : remainder = number/2 binary_string = str(remainder) + binary_string number = number//2 print ("Binary string is", binary_string)
|
|
string * number
|
Combine that string
|
|
string * string
|
Crash
|
|
number * number
|
Math - MULTIPLY
|
|
string ** string
|
Crash
|
|
number ** number
|
Math - EXPONENT
|
|
string ** number
|
Crash
|
|
String
|
A list of character such as number, letter and symbols ("Under quotes"
|
|
Variable
|
Hold a value and can be change
|
|
Integer Number
|
Whole number (Can be positive or negative)
|
|
Floating Point
|
The number with decimals
|
|
Syntax
|
Grammar/Structure of Language
|
|
Modulo
|
Find the reminder
|
|
Boolean
|
True/False
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.