-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathP3.6.py
More file actions
29 lines (26 loc) · 779 Bytes
/
P3.6.py
File metadata and controls
29 lines (26 loc) · 779 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#
## Read three number and ask for strictly or lenient mode for increasing or decreasing
#
# Read the input from user
num1=float(input('Enter 1st number: '))
num2=float(input('Enter 2nd number: '))
num3=float(input('Enter third number: '))
# ask for mode
mode=input('Enter mode ''strict'' or ''lenient'' before you start: ')
# set the rules or condition
if mode=='strict':
if num1<num2<num3:
print ('Increasing')
elif num1>num2>num3:
print ('Decreasing')
else:
print ('Neither')
elif mode=='lenient':
if num1<=num2<=num3:
print ('Increasing')
elif num1>=num2>=num3:
print ('Decreasing')
else:
print ('Neither')
else:
print ('You did not enter a valid item! try again..')