Take programming challenges online at any time! Write your code and test it as you go to see if you can come up with a solution.
Compete with coders by earning points. Climb the rankings to earn a spot at the top and then compete in our competitions!
Join a community of great coders and passionate people. Chat in the forums or even submit your own programming challenges for Coderbyte to use!
JavaScript Challenge
Using the JavaScript language, have the function jsChallenge() add up all of the
numbers from 1 to 1000. But every time a number appears that is divisible by 5 or 7, disregard it and do not add that number to the others
(ie. disregard 7, 10, 15, 21, etc).
Do not put any code outside of the function and use the return keyword to return your answer from within the function.
Your code was correct, great job!
Sign up to keep track of your completed challenges, get points, and rise ranks.
Python Challenge
Using the Python language, have the function pyChallenge() add up all of the
numbers from 1 to 1000. But every time a number appears that is divisible by 5 or 7, disregard it and do not add that number to the others
(ie. disregard 7, 10, 15, 21, etc).
Do not put any code outside of the function and use the print keyword to return your answer from within the function.
Your code was correct, great job!
Sign up to keep track of your completed challenges, get points, and rise ranks.