Upload files to "basic programming/1st task"

This commit is contained in:
2024-11-23 15:48:40 +02:00
parent b4ef6ebbac
commit a3e834c190
5 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
# Q7
# Get values from user
num1 = int(input("Enter 1st number:"))
num2 = int(input("Enter 2nd number:"))
num3 = int(input("Enter 3rd number:"))
# Determine smallest and largest
minimum = min(num1, num2, num3)
maximum = max(num1, num2, num3)
# Calculate sum
sum = minimum + maximum
# Print result
print(f"The sum of the smallest and largest number is: {sum}.")