Computer Science, asked by abhayajayan1, 5 months ago

write down the python program to exchange the values of two variables ​

Answers

Answered by anushkabangtan
0

Answer:

t1 = tuple( )

n = int(input('Total number of values in first tuple:'))

for i in range (n):

   a = input('Enter elements:')

   t1 = t1 + (a, )

t2=tuple( )

m = int(input('Total number of values in second tuple:'))

for i in range (m):

   a = input('Enter elements:')

   t2 = t2 + (a, )

   print ('First tuple')

   print (t1)

   print ('Second tuple')

   print (t2)

   t1, t2 = t2, t1

   print ('After swapping')

   print ('First tuple')

   print (t1)

   print ('Second tuple')

   print (t2)

.

.

.

HOPE IT HELPED  YOU

PLS MARK BRAINLIEST PLZ PLZ PLZ ...

Answered by Anonymous
2

Answer:

hello,

Explanation:

#python program to exchange the values of two variables ​

a=eval(input("enter the value"))

b=eval(input("enter the value"))

print("before swapping")

print("a="=a,"b=",b)

print("after swapping")

print("a="=b,"b=",a)

hope it helps you

please mark brainliest

@ItzSnowySecret07

Similar questions