Python Tutorial - How to swap two numbers in PYTHON

Publicado em: 27 Setembro 2017
no 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)


Nesta página do site você pode assistir ao vídeo on-line Python Tutorial - How to swap two numbers in PYTHON duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Appanna Damu 27 Setembro 2017, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 75 vezes e gostou 3 espectadores. Boa visualização!