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 trialAbigail Solomon
Data Analysis Techdegree Student 4,203 PointsSyntaxError with is_fizz variable
So I basically did all my code for this challenge program, but I can't run the program on workspace because of a syntax error on line 13. Weird thing is that I wrote the is_fizz and is_buzz variables in exactly the same way Ken does in the video but I can't run my program at all. What am I doing wrong? Here's the code: is_fizz = number % 3 == 0 is_buzz = number % 5 == 0
2 Answers
Abigail Solomon
Data Analysis Techdegree Student 4,203 PointsI don't know why Workspace didn't catch this, but my problem was that I had an extra opening parenthesis in the previous line of code for printing the name and number of the user. Not sure why it listed the next line as invalid syntax instead. My elif and else lines of code were also misaligned but the workspace was able to catch that. Checking every line of your code helps, I'll do that from now on.
Abigail Solomon
Data Analysis Techdegree Student 4,203 PointsI wish I could share snapshots of my actual code, but I don't see an attachment button anywhere on here. I remember I used to be able to do it too, could I please get help with that too?
Rohald van Merode
Treehouse StaffHey Abigail Solomon 👋
Underneath the textarea on the forum you'll find a Markdown Cheatsheet, in there you'll find all kinds of formatting options you have here in the community pages 🙂
For sharing single line code you can wrap it in single backticks, for longer code blocks you can use tripple backticks to start and end your code block (```).
When you're working in Workspaces and wish to share your complete code in that workspace you can click the camera icon in the top right of the workspace. This will provide you with the url of a snapshot which you can share with others to fork.
Hope this helps! 🙂