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 Basics (retired) Control Flow For-In Loop

This exercise should probably be more clear. I clearly succeeded...

See code...

for_loops.swift
for multiplesOfSeven in 1...10 {

println("\(multiplesOfSeven) times seven equals \(multiplesOfSeven*7)")

}
Konrad Pilch
Konrad Pilch
2,435 Points

Hey, i dont know, but, maybe u should use a ; at the end? : p

Konrad Pilch
Konrad Pilch
2,435 Points

Btw, lots of people made it : p u must be somewhere wrong if it didnt passed.

Hah.

No, the issue was that it reads out " 1 times seven equals 7" rather than "1 * 7 = 7"

It was funny because the code was all correct, and reads out "X times seven = Y" all the way to 70. But it said it was incorrect.

I am having a problem because I'm using Xcode 7. Println isn't a function, apparently, in swift 2.

Konrad Pilch
Konrad Pilch
2,435 Points

Maybe its because u put and extra space or somehting? xd i dont know, maybe re-write the code again . Sometimes things happens.

1 Answer

Piotr Nejman
Piotr Nejman
3,374 Points

Code is ok, but it prints "1 times seven equals 7" instead of 1*7=7

println("\(multiplesOfSeven) * 7 = \(multiplesOfSeven*7)")