uploaded 1-6
This commit is contained in:
14
basic programming/2nd task/2.py
Normal file
14
basic programming/2nd task/2.py
Normal file
@@ -0,0 +1,14 @@
|
||||
# Q2
|
||||
|
||||
num1 = float(input("Enter 1st number: "))
|
||||
num2 = float(input("Enter 2nd number: "))
|
||||
num3 = float(input("Enter 3rd number: "))
|
||||
|
||||
if num1 > num2:
|
||||
num1, num2 = num2, num1
|
||||
if num1 > num3:
|
||||
num1, num3 = num3, num1
|
||||
if num2 > num3:
|
||||
num2, num3 = num3, num2
|
||||
|
||||
print(f"Sorted numbers: {num1}, {num2}, {num3}")
|
||||
Reference in New Issue
Block a user