# best practices for naming conventions # lowercase > variable firstname function mycalculator() filename code # TitleCase > filename Modules Class Names Contacts Service Names # UPPERCASE > PROVIDERS / INPUTS # underscore_case / snake_case > variables first_name method names # camelCase > rules for lowercase # DRY Don't Repeat Yourself # Python Core Modules > Functions you get install Python automatically # Python Standard Modules > Installed with Python BUT import app # Python Custom Modules > your custom, extensions pypi.org, github pip # page 10 a = 7 # a variable name data type int value 7 b = 3 # whitespace does not matter but be pythonic type syntax c = 9 x = ( a + b ) * c # ( 7 + 3 ) * 9 output 90 print(x) # function name with tuple decorator() # page 14 # input() always assumes the value to be a string firstName = input("Enter your first name: ") # form web lastName = input("Enter your last name: ") # Join Level 1 way of working with strings data types have to match fullName = firstName + " " + lastName # stored in memory print("Contact full name: " + fullName) # join # page 18 get first char of last name # bracket notation structure [list] {set} (tuple) charOfLastName = lastName[0] print(charOfLastName) # asserted value M vipStatus = True print( type(vipStatus) ) # type of object in memory # while keyword DEFINE break "infinity" page 21 print("While loop") i = 0 # control variable while i < 10: # while condition is True # indentation tab or 4 spaces # scope of the operation java/js/c#,... { ops; } print(i) i += 1 print("--------------") print("For loop") # for keyword BUILT IN break page 23 for i in range(0,10): print(i)