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 trialdanielmorales10
78 PointsMy func is getting the numbers as is expected, but the workplace don't accept it.
My function is getting the result as is expected but the system doesn't accept it.
package loops
import "fmt"
func CountByThrees(start int, end int) {
for start := 3; start <= end; start += 3 {
fmt.Println(start)
}
}
1 Answer
Jennifer Nordell
Treehouse TeacherHi there, danielmorales10! This is really close. However, you're assuming that the starting number is 3. It should start at whatever number we gave as the start. For instance, if I sent in 15, and 102, I would expect it to start counting at 15, not 3.
So instead of:
for start := 3
You would need:
for start := start
Hope this helps!