From 8d18864df5cbbf38e33d9b25c0e71c1d9082564c Mon Sep 17 00:00:00 2001 From: subhanshugithub Date: Thu, 1 Oct 2020 14:26:44 +0530 Subject: [PATCH 1/2] added a basic swap program --- basics/swap.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 basics/swap.py diff --git a/basics/swap.py b/basics/swap.py new file mode 100644 index 0000000..2d46626 --- /dev/null +++ b/basics/swap.py @@ -0,0 +1,6 @@ +#A basic swap programming program made in python with just few lines of code +a=int(input("ENTER NUMBER 1: ")) +b=int(input("ENTER NUMBER 2: ")) +a,b=b,a +print("NUMNBER 1 :",a) +print("NUMBER 2 :",b) \ No newline at end of file From 73eae1076ea3ed67a3ae77c85005971053cd8919 Mon Sep 17 00:00:00 2001 From: SrivastavaSatyam <71383127+SrivastavaSatyam@users.noreply.github.com> Date: Fri, 2 Oct 2020 21:23:21 +0530 Subject: [PATCH 2/2] Update swap.py turned the code into an exercise. now ,is it ok? --- basics/swap.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/basics/swap.py b/basics/swap.py index 2d46626..f1f48f3 100644 --- a/basics/swap.py +++ b/basics/swap.py @@ -1,6 +1,10 @@ #A basic swap programming program made in python with just few lines of code a=int(input("ENTER NUMBER 1: ")) b=int(input("ENTER NUMBER 2: ")) -a,b=b,a +#Enter two numbers and swap there values +#write your code here + + + print("NUMNBER 1 :",a) -print("NUMBER 2 :",b) \ No newline at end of file +print("NUMBER 2 :",b)