Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Swift Collections and Control Flow Control Flow With Conditional Statements Working With Logical Operators

Joseph Perl
Joseph Perl
667 Points

Help with Challenge Question. Swift If Statements.

Hello. I can't get my code to work. Please help.

Thanks

operators.swift
var results: [Int] = []


for n in 1...100 {
  if n !a even && n%7 == int {
    result.append(n)
  }
}

3 Answers

Joseph Perl
Joseph Perl
667 Points

Thank you very much Alphonso! I got the code to work.

Is there a way that I can search for forum topics and questions based on the video or challenge question that I'm watching?

Alphonso Sensley II
PLUS
Alphonso Sensley II
Courses Plus Student 8,514 Points

You can type in parts of the challenge question in the search bar. That will usually get you close to what you need help with.

Joseph Perl
Joseph Perl
667 Points

Thank you Alphonso. I'll try that.