livia salgado4,407 Points
while true: vs while True: why if i use the first one it shows error? why it has to be capitalized
the console showed error on the line while true: i realiza i had t instead of T, why that is important that's the difference, thanks!
Jennifer NordellTreehouse Teacher
Hi there! It's because
True is a reserved word in the Python language, but
true is not. The
True value is a built-in constant and is part of the language. If you try and use
true, it thinks you're trying to reference a variable name. Almost everything in programming is case-sensitive. This is true regardless of which language you're working with.
Here's some documentation on built-in constants in Python.
Hope this helps!