• Selecting Code with Conditions

    #!/usr/bin/python3 a, b = 0, 1 if a < b: print('a ({}) is less than b ({})'.format(a, b)) #Code Blocks are called as "Suit" in Python and Python Ineterpreter Looks after ":" and #requires a consitant Indenting. #Remember : whitespaces are important and Python is case sensitive. else: print('a ({}) is Not less than b ({})'.format(a, b)) # Python Expressions may also contain conditions. example below print("Linux" if a < b else "Windows") #-------------- More Conditions # A condition is technicaly a boolean expression. # Since it's boolean in nature it will and must result as true/false. if True: print("Love You, Python!!") else: print("Dont Choose wrong Choices in Life..") # Try Below statements and look for the results # False | 1 | 3 | "False" | "abc" | None | [] | 0 | "" choice = "My Choice My Life" if choice == "Python" or choice == "My Choice My Life": print("Love You, Python!!") elif choice == "Ruby": print("Love You, Ruby") else: print("Dont Choose wrong Choices in Life..") Ask Vikas
    Just press 'Run'.