Python Tutorial - How to swap two numbers in PYTHON

Опубликовано: 27 Сентябрь 2017
на канале: 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)


На этой странице сайта вы можете посмотреть видео онлайн Python Tutorial - How to swap two numbers in PYTHON длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Appanna Damu 27 Сентябрь 2017, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 75 раз и оно понравилось 3 зрителям. Приятного просмотра!