Python Forum
Basic coding question with Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Basic coding question with Python (/thread-10489.html)



Basic coding question with Python - Than999 - May-23-2018

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')



RE: Basic coding question with Python - micseydel - May-23-2018

Python should be telling you it's a syntax error, and exactly where that error is. It's => - you flipped the characters.


RE: Basic coding question with Python - Than999 - Jul-17-2019

(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!


RE: Basic coding question with Python - jefsummers - Jul-17-2019

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