Skip to content

Tarunmittalg/python11

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python11

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))

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%