Respuesta :

A program that swaps the values stored/assigned in the variables x and y is given below:

An additional variable was defined to accomplish the task.

The Program

# Python program to demonstrate

# swapping of two variables

x = 10

y = 50

# Swapping of two variables

# Using third variable

temp = x

x = y

y = temp

print("Value of x:", x)

print("Value of y:", y)

Using Naive approach

The most naive approach is to store the value of one variable(say x) in a temporary variable, then assign the variable x with the value of variable y. Finally, assign the variable y with the value of the temporary variable.

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1