''' Purpose: introduce relational operators ''' # get two numbers from user print() sa = input( 'Enter number: ' ) sb = input( 'Enter number: ' ) print() # convert inputs to integer a = int( sa ) b = int( sb ) # At this point, we got two numbers and converted them into integers. # compare and record results # These are several variables set to operations using rational operators between the integers. Each b1-6 is a boolean values! True or False! b1 = ( a < b ) # < is less than b2 = ( a > b ) # > is greater than b3 = ( a <= b ) # <= is less than or equal to b4 = ( a >= b ) # >= is greater than or equal to # == and != will be particularly useful later on in the semester! More on that soon! b5 = ( a == b ) # == is equals b6 = ( a != b ) # != is not equals (or is different from) # display results print( a, '< ', b, ':', b1 ) print( a, '> ', b, ':', b2 ) print() print( a, '<=', b, ':', b3 ) print( a, '>=', b, ':', b4 ) print() print( a, '==', b, ':', b5 ) print( a, '!=', b, ':', b6 ) print() # Display results #b1 through b6 are boolean values (False and True are boolean values) #There are only two boolean values: True and False #There are a lot of operators that return boolean values such as <, >, <=, >==, ==, != ... # You can see tat depending on what numbers you put in, b1-b6 will be True or False based on that.