aboutsummaryrefslogtreecommitdiff
path: root/challenge-340/eric-cheung/python/ch-2.py
blob: c5de473983822471acd5982b00979d99af846c08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
## strInput = "The cat has 3 kittens 7 toys 10 beds"  ## Example 1
## strInput = "Alice bought 5 apples 2 oranges 9 bananas"  ## Example 2
## strInput = "I ran 1 mile 2 days 3 weeks 4 months"  ## Example 3
## strInput = "Bob has 10 cars 10 bikes"  ## Example 4
strInput = "Zero is 0 one is 1 two is 2"  ## Example 5

arrNum = [int(strLoop) for strLoop in strInput.split(" ") if strLoop.isnumeric()]

bIsStrictIncrease = all([arrNum[nIndx] > arrNum[nIndx - 1] for nIndx in range(1, len(arrNum))])

print (bIsStrictIncrease)