#Conditionals name = "sgdf" #The usual variable declaration #A condition is TRUE or FALSE, these are BOOLEAN values #If Block if name == "guzy": print("welcome to the lab") print("picnic time") else: print("robot rebellion begins!") if name == "guz": #MUST start with a 'if' print("learn to type") elif name == "Mrs K": #As many elif's as you want print("everythign is oooo K") elif name == "more things": print("you can have as many of these as you want its fine") else : print("final option.") #Only 1 else allowed, but its totally optional if name == "g": print("do nothing or something, doesn't matter") elif name == "g": print("output solution to world hunger") #See, totally didn't need an else to end it all, if its not a g it does nothing #You can combine multiple conditions together to get decisions done #Boolean operators: # == comparison, are they the same # != NOT equal, are they different # > < >= <= greater than less than etc # and "are both values True" # or "is one of the values True" # not "opposite day!" """ AND: are they both True T and T => T T and F => F F and T => F F and F => F OR: is one them True T or T => T, correct one of those is a T F or T => T T or F => T F or F => F NOT: switch it not True => False not False => True Examples: True and False = False 3 > 1 and 9 < 7 = False """