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 trialThomas Thelen-Clemmons
Python Development Techdegree Graduate 13,757 PointsFeedback
HI all just another person looking for feedback, please be gentle!
1 Answer
Steven Parker
231,269 PointsLooks like you're off to a good start! But I wasn't quite sure if you were simply experimenting with different ways of doing things or not. In case not, here's a few suggestions for future projects:
- if you make some inputs case-insensitive, it might make sense to make them all that way
- the same case insensitivity trick can also prevent needing to compare to multiple answer versions
- you can save on numeric conversions by just comparing to strings (like:
mathAdd == "4"
) - in an "else if" chain, the last term can be a plain "else" since all other cases have been handled
- inequalities can save needing multiple comparisons (like "
else if (right >= 3)
")
Thomas Thelen-Clemmons
Python Development Techdegree Graduate 13,757 PointsThanks, that was incredibly helpful greatly appreciate the feedback. There is definitely a lot of experimenting going on and some lack of knowledge. Is it proper etiquette to declare variables at the top or is that not a thing?
Steven Parker
231,269 PointsDeclaring the variables at the top is definitely a "best practice" and good habit to develop!
And happy holidays!
Tommy Gebru
30,164 PointsTommy Gebru
30,164 PointsGreat work with this quiz Thomas, I enjoyed the trivia alongside the math questions!