Python Program To Swap Two Numbers || python programs

preview_player
Показать описание

In this program, we define a function swap_numbers that takes two numbers as input and swaps their values using a temporary variable temp. The function returns the swapped values.

Before swapping, we print the original values of the numbers. Then, we call the swap_numbers function, passing the input numbers as arguments, and assign the returned values to number1 and number2.

Finally, we print the swapped values to verify the swapping.
#python #pythonforbeginners #swapnumbersusingpyhton
#swapnumbers #halesh #halesh ks
#haleshks
Рекомендации по теме