allows user to input a number instead of a string
Character named name in the Unicode database(Unicode only)
holds a value and can be changed
a list of characters such as numbers, letters, symbols
the type used to represent number
Using this on the beginning of a line with comment out the rest of the line
Multiplication and Exponents
string * number
combine that string multiple times
string * string
number * number
math - multiply
string ** string
number ** number
math - exponents
string ** number
Python Comparison Operators
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.
converts a value to an integer
displays info to the user
receives info from the user
string + string
math - addition
def createList(quit word) :
print ('keep entering words to add to the list')
print ('Quit When word=' , quitword)
user_word = input('Enter a word to add to the list:')
is user_word == quit word:
duplicateword = false
if duplicate word == True:
print ('Duplicate Word')
Help Us Go Positive!
We offset our carbon usage with Ecologi. Click the link below to help us!