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 trial

iOS Swift 2.0 Collections and Control Flow Control Flow With Loops For In Loops

Jeffrey Ratner
PLUS
Jeffrey Ratner
Courses Plus Student 1,023 Points

Not sure what question is asking you to do

I can't quite figure out what the problem is asking you to do. Can someone spell it out in more detail? Thanks.

loops.swift
// Enter your code below
var results: [Int] = []
for results in 1...10{
    let multiplier = 6
    print("\(results) * \(multiplier)")
     let multiple = (multiplier * 6)
    results.append(multiple)


    }

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

I actually think you have the right idea but your variable names are getting a little confused here and there. Also, you're printing when it doesn't want you to print. I posted a solution with a fairly detailed explanation to this challenge not long ago here:

https://teamtreehouse.com/community/challenge-task-2-of-2-swift-20-collections-and-control-flow

Take a look! Hope this helps! :smiley: