0
where we can use swapping values program?
let us find how we can implement "swapping values" program in our other programs. ok idea number 1.=>> if we have to output the small number in specific variable. please tell if you can think other and enjoy the following code https://code.sololearn.com/cOjdaU29Gy8q/?ref=app
5 odpowiedzi
+ 4
That's not how swapping values works. Check this out.
a = 1
b = 5
a,b = b,a
print(a,b)
# output:
5 1
+ 1
First of all, I suggest you to use int(input()), not input().
For swapping, you can just simply do x, y = y, x.
+ 1
What do you think pranks are?
+ 1
Slick the prank is that, there is no prank 🤪
0
Slick ,yes but thats why I stated "prank", as it was only displaying other variables