| 12345678910111213141516171819202122232425 |
- import os
- def printLowest():
- "Takes to numbers from prompt and prints the lowest of them"
- # Assign the prompted numbers to variables x and y
- x = int(input("Enter a number: "))
- y = int(input("Enter another number: "))
- # Test if x is lesser than y
- if x < y:
- print(x)
- # Test if y is lesser than x
- elif y < x:
- print(y)
- # If previous conditionals weren't met, assume equal values
- else:
- print("Both numbers are ", x)
- return
- # Clear screen
- os.system("clear") # Mac or Linux
- # os.system("cls") # Windows
- # Call to function printLowest()
- printLowest();
|