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 trialNigel Matheson
Courses Plus Student 1,166 PointsI think My X Code doesn't work properly?
When I put in codes or try to follow the swift course my x code on the right does not sum up the same as the tutorials on the right hand side of the screen.
An example for i in 0...5{ print(i) now on the right it should say (6 times) but my one just repeats what I have already written. I know there is a tiny box and a eye box in the gully on the right hand side but it still does not say 6 only 5, which is confusing.
Please help
5 Answers
Nigel Matheson
Courses Plus Student 1,166 Points/Users/nigelmatheson/Desktop/Screen Shot 2017-08-02 at 08.49.40.png I don't know if this will work, if not I'l have to try another way to post this.
Thanks
Michael Hulet
47,913 PointsTo post an image to Treehouse's Community, you'll have to upload it to another site and link it with Markdown. You can use something like Imgur or ImgBB. You'll wanna copy the direct link to your image from there, and then you can learn how to reference it here by reading the Markdown Cheatsheet below every typing box in the Community, or you can watch the relevant portion of the Markdown Basics course
Nigel Matheson
Courses Plus Student 1,166 PointsThanks I just joined and posted the screen shot
Thank you
Michael Hulet
47,913 PointsNo problem! Could you post a screenshot of the whole Xcode window? There are a few buttons I'm looking to see if you have pressed or not in a few different places
Michael Hulet
47,913 PointsIn your playground, you have the Assistant Editor open, which probably isn't what you want. That's what brings up 2 files side by side (in your screenshot, it's just the same file twice). To close it, you can hit the x
button in the top right that's both below and next to a +
button. After that, you have a syntax error on line 7. You need to name the variable i
, as it's currently unnamed (which is a syntax error in Swift). After that, if you it the blue play triangle in the bottom left, I think you'll be good to go
Nigel Matheson
Courses Plus Student 1,166 PointsHi Michael thanks for that but there is still no total on the right hand side of the screen
Michael Hulet
47,913 PointsMichael Hulet
47,913 PointsCould you post a screenshot?