Swap Two number Program in Python

Google Advertisements

Prev Tutorial Next Tutorial

Swap Two number Program in Python

For write this program need only print statement for print message on screen and and need three variable first store first variable in second variable and second variable value store in third variable. Finally third variable value store in first variable.

Hello World Program in Python

a = input('Enter value of a: ')
b = input('Enter value of b: ')

temp = a
a = y
b = temp

print('After swapping a: {}'.format(x))
print('After swapping b: {}'.format(y))

Output

	
Enter value of a: 10
Enter value of b: 20

After swapping a:20
After swapping b:10

Prev Tutorial Next Tutorial

Google Advertisements

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Download Projects

Google Advertisements


Buy Websites 9999595223

Buy Fresh and Payment Receive Media.net Account with Website. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs