5.18 LAB Swapping Variables
5.18 LAB Swapping Variables
Your program must define and call the following function. swap_values() returns the
two values in swapped order.
def swap_values(user_val1, user_val2)
temp = user_val1
user_val1 = user_val2
user_val2 = temp
This study source was downloaded by 100000864675654 from CourseHero.com on 03-31-2023 16:02:33 GMT -05:00
https://www.coursehero.com/file/95745528/518-LAB-Swapping-variablesdocx/
return user_val1, user_val2
if __name__ == '__main__':
user_val1 = int(input())
user_val2 = int(input())
print(user_val2, user_val1)
This study source was downloaded by 100000864675654 from CourseHero.com on 03-31-2023 16:02:33 GMT -05:00
https://www.coursehero.com/file/95745528/518-LAB-Swapping-variablesdocx/
Powered by TCPDF (www.tcpdf.org)