Week 2 Notes - morgan-hanrahan/Tech-Journal GitHub Wiki
The order of operations (precedence) of Python is similar to that of mathematics.
''' BLOCK COMMENT ------------> Block comments can have more than one line in between '''
'#' (without quotes) REGULAR COMMENT -------> can only be on one line
int() can only work with whole numbers
float() allows you to work with decimals and whole numbers (works similar to int)
Conditionals: if age >= 18: print('You are old enough to vote') else: print('You are not old enough to vote')
Invalid variable names:
- Hyphens ex. current-balance
- Spaces ex. current balance
- beginning with a number ex. 4account
- just a number ex. 42
- special characters ex. total_ca$h
- quotes ex. 'hello'