Skip to content

Commit 3f00af2

Browse files
committed
Swap Two Number Using User Input
0 parents  commit 3f00af2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

swap_two_no.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python3
2+
3+
no1 = float(input("Enter Number First Number:"))
4+
no2 = float(input("Enter Number Second Number:"))
5+
6+
no1,no2 =no1,no2
7+
print("Before swap Numbers :{} {}".format(no1,no2))
8+
no1,no2 =no2,no1
9+
10+
print("After swap Numbers :{} {}".format(no1,no2))
11+
12+

0 commit comments

Comments
 (0)