Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialShoan Chikato
28,011 PointsError in the question
The end number needs to be incremented by 1
package loops
import "fmt"
func CountByThrees(start int, end int) {
// YOUR CODE HERE
}
1 Answer
Steven Parker
231,236 PointsYou probably don't want to increment the "end" number. You'll need it in your loop to know when to stop.
You will want to increment a loop variable, but perhaps not by 1 (hint: the name of the function is "CountByThrees").
Shoan Chikato
28,011 PointsShoan Chikato
28,011 PointsThere is an error in the question, your suggested solution wouldn't work and you will be stuck.
Steven Parker
231,236 PointsSteven Parker
231,236 PointsIt should work just fine if your loop begins at the
start
value, and runs while the loop variable is less than or equal ("<=") to theend
value, and of course increments by 3.