Python Forum

Full Version: Basic coding question with Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, what is wrong with my code here?

twinkies = 250

if twinkies => 100 and twinkies <= 500:
	print('too few or too many')
else:
	print('neither')
Python should be telling you it's a syntax error, and exactly where that error is. It's => - you flipped the characters.
(May-23-2018, 05:15 AM)micseydel Wrote: [ -> ]Python should be telling you it's a syntax error, and exactly where that error is. It's => - you flipped the characters.

Thanks!
Also bad logic. If greater than 100 and less than 500 twinkies, I'd say that's just right!