max_1020

Given 2 positive int values, return the larger value that is in the range 10..20 inclusive, or return 0 if neither is in that range.

This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.

Test 1

Input:

11
19

Output:

19

Test 2

Input:

19
11

Output:

19

Test 3

Input:

11
9

Output:

11

Test 4

Input:

9
21

Output:

0

Test 5

Input:

10
21

Output:

10

Test 6

Input:

21
10

Output:

10

Test 7

Input:

9
11

Output:

11

Test 8

Input:

23
10

Output:

10

Test 9

Input:

20
10

Output:

20

Test 10

Input:

7
20

Output:

20

Test 11

Input:

17
16

Output:

17