Skip to content

srijith-rj/Swapping-two-values

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Swapping-two-values

AIM:

To write a python program for swapping of two values

EQUIPEMENT'S REQUIRED:

PC Anaconda - Python 3.7

ALGORITHM:

Step 1:

Get the two values from the user

Step 2:

Assign the value of second variable to a temporary variable

Step 3:

Assign the value of the first variable to the second variable.

Step 4:

Assign the value in temporary variable to the first variable

Step 5:

Print both the values it would be interchanged

Step 6:

End the program

PROGRAM:

#Program to swap two values.
#Developed by: SRIJITH R
#RegisterNumber: 212221240054
num1,num2=int(input()),int(input())
num1,num2=num2,num1
print('Swapped values are:',num1,num2)

OUTPUT

GitHub Logo

RESULT:

Thus the swapping of two values are successfully executed

About

Swapping two values

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%