numSwapping

    0

    0

    Mahendra Kumar

    beginnerlogic

    Program to swap two numbers

    # take inputs
    a = input('Enter the value of a: ')
    b = input('Enter the value of b: ')
    print('Values Before Swapping')
    print('a = ',a, 'and b = ',b)
    # create a temporary variable and swap the value
    temp = a
    a = b
    b = temp
    # display swapping values
    print('Values After Swapping')
    print('a = ',a, 'and b = ',b)
    
    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.