We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Test Case #7 is Input=20, and your range on line 7 goes from 6 to 19. Remember that for range, the last number isn't counted, so range(6,21) would actually be correct, as it would count 20 and miss out 21. Hope this helps!
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Python If-Else
You are viewing a single comment's thread. Return to all comments →
Test Case #7 is Input=20, and your range on line 7 goes from 6 to 19. Remember that for range, the last number isn't counted, so range(6,21) would actually be correct, as it would count 20 and miss out 21. Hope this helps!