Program to interchange values between variables.

In this python basic program, we will interchange values between variables.

Steps to solve the program
  1. Take two variables as input and assign value to them.
  2. Interchange their values using “, = “.
  3. Print the variables after interchanging the values.
				
					a = 10
b = 20
a,b = b,a

print("a: ",a)
print("b: ",b)
				
			

Output :

				
					a:  20
b:  10
				
			

print the square and cube of a given number.

solve this Pythagorous theorem.

Leave a Comment