|
int(raw_input())
|
allows user to input a number instead of a string
|
|
\N(name)
|
Character named name in the Unicode database(Unicode only)
|
|
variable
|
holds a value and can be changed
|
|
string
|
a list of characters such as numbers, letters, symbols
|
|
float
|
the type used to represent number
|
|
Octothorpe (#)
|
Using this on the beginning of a line with comment out the rest of the line
|
|
string * number
|
combine that string multiple times
|
|
string * string
|
crash
|
|
number * number
|
math - multiply
|
|
string ** string
|
crash
|
|
number ** number
|
math - exponents
|
|
string ** number
|
crash
|
|
<>
|
If values of two operands are not equal, then condition becomes true.
|
|
>
|
If the value of left operand is greater than the value of right operand, then condition becomes true.
|
|
==
|
If the values of two operands are equal, then the condition becomes true.
|
|
<
|
If the value of left operand is less than the value of right operand, then condition becomes true.
|
|
int()
|
converts a value to an integer
|
|
print()
|
displays info to the user
|
|
input()
|
receives info from the user
|
|
print (name.upper())
|
|
|
print (name.capitalize())
|
|
|
print (name.lower())
|
|
|
print (name.title())
|
|
string + string
|
combine together
|
|
sting+number
|
crash
|
|
number+number
|
math - addition
|
|
def createList(quit word) :
|
|
print ('keep entering words to add to the list')
|
|
print ('Quit When word=' , quitword)
|
|
mylist=[]
|
|
while true:
|
|
user_word = input('Enter a word to add to the list:')
|
|
is user_word == quit word:
|
|
return mylist
|
|
duplicateword = false
|
|
if duplicate word == True:
|
|
print ('Duplicate Word')
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.