Write a program to swap two variables. (in python)
(Any python expert here ?)
Answers
Answered by
14
Here is your answer !
________________
# Python program to swap two variables
x = 5
y = 10
# To take inputs from the user
#x = input('Enter value of x: ')
#y = input('Enter value of y: ')
# create a temporary variable and swap the values
temp = x
x = y
y = temp
print('The value of x after swapping: {}'.format(x))
print('The value of y after swapping: {}'.format(y))
_____________________
Actually I'm a beginner ^^
( So please don't mind if I made any mistake in the Answer )
I just started learning python and it has been two weeks I'm continuing with it !
Python is just so dámn amazing :D
Anyways, Take care !!
Answered by
4
Answer:
ùr ãñswer høpe it helps you
ARMY✌️
Attachments:
Similar questions
India Languages,
12 days ago
Math,
12 days ago
Math,
25 days ago
Social Sciences,
7 months ago
Math,
7 months ago