|
print()
|
Show information that you want on the screen
|
|
int()
|
change number to be number integer
|
|
float()
|
change number to be decimal number
|
|
str()
|
a list of number, letter and symbols
|
|
==
|
equal to
|
|
!=
|
unequal to
|
|
>
|
more than
|
|
<
|
less than
|
|
>=
|
more than or equal to
|
|
<=
|
less than or equal to
|
|
variable
|
hold a value and can be change
|
|
input
|
gain information from user
|
|
string
|
a list of character such as number, letter and symbols
|
|
integer number
|
whole number or counting number
|
|
float number
|
the number in decimal
|
|
syntax
|
grammar or structure of lauguage
|
|
value
|
|
|
string + string
|
combine together
|
|
string + number
|
crash
|
|
number + number
|
math - addition
|
|
string * number
|
combine that string
|
|
string ** number
|
crash
|
|
number * number
|
math - multiply
|
|
number ** number
|
math - exponent
|
|
string * string
|
crash
|
|
string ** string
|
crash
|
|
while = loop
|
|
word = input("Please enter a word")
|
|
index = 0
|
|
reverse = ' '
|
|
while int(index) < len(word):
|
|
reverse = word[index] + (reverse)
|
|
index = int(index) + 1
|
|
print ("Reverse: ", reverse)
|
|
user_number = ' '
|
|
while user_number != '0' ;
|
|
user_name = 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)
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.