near_hundred

Ask the userr for an integetr. Output 'True' if it is within 10 of 100 or 200. Note: abs() computes the absolute value of a number. For the test cases below, False means “no” and True means “yes”.

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:

93

Output:

True

Test 2

Input:

90

Output:

True

Test 3

Input:

89

Output:

False

Test 4

Input:

110

Output:

True

Test 5

Input:

111

Output:

False

Test 6

Input:

121

Output:

False

Test 7

Input:

-101

Output:

False

Test 8

Input:

-209

Output:

False

Test 9

Input:

190

Output:

True

Test 10

Input:

209

Output:

True

Test 11

Input:

0

Output:

False

Test 12

Input:

5

Output:

False

Test 13

Input:

-50

Output:

False

Test 14

Input:

191

Output:

True

Test 15

Input:

189

Output:

False

Test 16

Input:

200

Output:

True

Test 17

Input:

210

Output:

True

Test 18

Input:

211

Output:

False

Test 19

Input:

290

Output:

False