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 trialEmmanuel Nunez
1,482 PointsIm not understanding the request for from that challenge task. Perhaps re-wording can help.
for multiplier in 1...10{
results.append(multiplier)
print("\(multiplier) times 6 is equal to \(multiplier * 6)")
}
//The code above shows that results is being update by the count of the multiplier then being printed in the result.
// Enter your code below
var results: [Int] = []
for multiplier in 1...10{
results.append(multiplier)
print("\(multiplier) times 6 is equal to \(multiplier * 6)")
s
}
1 Answer
Steven Deutsch
21,046 PointsHey Emmanuel Nunez,
You're really close! You just need to calculate multiplier * 6 in the parentheses of you append method.
// Enter your code below
var results: [Int] = []
for multiplier in 1...10{
results.append(multiplier * 6)
}
Your code will now add the computed value for multiplier to the results array.
Good Luck!
Emmanuel Nunez
1,482 PointsEmmanuel Nunez
1,482 PointsThanks Steven. I was reading the request for the task wrong.