How to swap two numbers in PYTHON
#Hi everyone, In this video am going to explain how to swap two numbers
lets start the code,
lets read the two values from keyboard,
now take one temporary variable called temp
and apply swap technique
now use print statement to display output
now run the code
now we can observe the swapping of given numbers a is replaced with 20 and b is replaced with 10
Thanks for watching this video
a=int (input('enter first number '))
b= int (input('enter second number'))
temp=a
a=b
b=temp
print ('a=',a,' , ','b=',b)
Sur cette page du site, vous pouvez voir la vidéo en ligne Python Tutorial - How to swap two numbers in PYTHON durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Appanna Damu 27 septembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 75 fois et il a aimé 3 téléspectateurs. Bon visionnage!