Which number is bigger and by how much for random numbers
Question: I'm doing an online tutorial on python, and its asking to write a program that
takes two random integers as parameters and display which integar is larger
and by how much using a void function. But if both random intgars are the same
the def show-larger should handle that too. So in the main section I have
written the code to generate 2 random numbers, I'm not sure how to do the next
step and call show_larger with the integers as arguments. The example
solutions that are given are 3 is larger than 1 by 2 and The integers are
equal, both are 3. This is what I have so far:

    
    
    def main():
    value_1=random.randrange(1,6)
    value_2=random.rangrange(1,6)
    
    def show_larger():    
    difference= value_1=-value_2
    if value_1 == value_2:
        print('The integers are equal, both are' + str(value_1))
    


Answer: This would be a simple way of doing it.

    
    
    import random
    
    def main():
        value_1=random.randrange(1,6)
        value_2=random.randrange(1,6)
        show_larger(value_1, value_2)
    
    def show_larger(value_1, value_2):
        if value_1 == value_2:
            print('The integers are equal, both are' + str(value_1))
            return
        else:
            print(("value_1" if value_1>value_2 else "value_2") + "is bigger by" + str(abs(value_1 - value_2)))
    
    main()
    

