Python Tutorial - How to swap two numbers in PYTHON

Publicado el: 27 septiembre 2017
en el canal de: Appanna Damu
75
3

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)


En esta página del sitio puede ver el video en línea Python Tutorial - How to swap two numbers in PYTHON de Duración hora minuto segunda en buena calidad , que subió el usuario Appanna Damu 27 septiembre 2017, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 75 veces y le gustó 3 a los espectadores. Disfruta viendo!