Number Difference

    0

    0

    Mahendra Kumar

    beginnerlogic

    Finding the difference between two number

    # first number
    num1 = int(input())
    # second number
    num2 = int(input())
    # num1 is greater than num2
    if num1 > num2:
        diff = num1 - num2
    # num1 is less than num2
    else:
        diff = num2 - num1
    # print difference value
    print('The difference between numbers =', diff)
    
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.