1) Below is a function that returns swapped values of four variables. def swap(a,b,c,d): return (b,c,d,a) What are the v

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1) Below is a function that returns swapped values of four variables. def swap(a,b,c,d): return (b,c,d,a) What are the v

Post by answerhappygod »

1) Below is a function that returns swapped values of four
variables.
def swap(a,b,c,d):
return (b,c,d,a)
What are the values of a, b, c, and d after running the
following code?
a, b, c, d = 7, 3, 2, 1
a, b, c, d = swap(a, b, c, d)
d, c, b, a = swap(a, b, c, d)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply