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

Python Python Basics (2015) Logic in Python Booleans

Q-1

How to solve this Q?

var right = 8
var wrong = 4

var right = 4 + 4
var wrong = 0
booleans.py
var right = 8
var wrong = 4

var right = 4 + 4
var wrong = 0

1 Answer

Michael Hulet
Michael Hulet
47,912 Points

Your problem is that you're writing JavaScript in a Python challenge. In Python, the var keyword doesn't exist. You just write the name of the variable, like this:

right = True
wrong = False

Thanks, Michael