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)
In questa pagina del sito puoi guardare il video online Python Tutorial - How to swap two numbers in PYTHON della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Appanna Damu 27 settembre 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 75 volte e gli è piaciuto 3 spettatori. Buona visione!