id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

Logic-1 > near_ten
prev  |  next  |  chance

Given a non-negative number "num", return True if num is within 2 of a multiple of 10. Note: (a % b) is the remainder of dividing a by b, so (7 % 5) is 2. See also: Introduction to Mod


near_ten(12) → True
near_ten(17) → False
near_ten(19) → True

...Save, Compile, Run (ctrl-enter)

def near_ten(num):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 124.0

Copyright Nick Parlante 2017 - privacy