Python Forum
Basic coding question with Python
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Basic coding question with Python
#1
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')
Reply
#2
Python should be telling you it's a syntax error, and exactly where that error is. It's => - you flipped the characters.
Reply
#3
(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!
Reply
#4
Also bad logic. If greater than 100 and less than 500 twinkies, I'd say that's just right!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Basic list question sanora600 2 341 Apr-13-2025, 07:07 AM
Last Post: noisefloor
  Basic Coding Question: Exit Program Command? RockBlok 3 1,746 Nov-19-2023, 06:31 PM
Last Post: deanhystad
  [solved] Basic question on list matchiing paul18fr 7 3,069 May-02-2022, 01:03 PM
Last Post: DeaD_EyE
  Very basic calculator question BoudewijnFunke 4 2,869 Dec-10-2021, 10:39 AM
Last Post: BoudewijnFunke
  basic question isinstance tames 5 3,953 Nov-23-2020, 07:20 AM
Last Post: tames
  basic question about tuples and immutability sudonym3 6 4,025 Oct-18-2020, 05:11 PM
Last Post: sudonym3
  [split] Very basic coding issue aary 4 3,405 Jun-03-2020, 11:59 AM
Last Post: buran
  Very basic coding issue mstichler 3 3,339 Jun-03-2020, 04:35 AM
Last Post: mstichler
  Regarding question on coding asmfloyd 2 2,630 May-26-2020, 08:02 AM
Last Post: buran
  Basic Pyhton for Rhino 6 question about variables SaeedSH 1 2,675 Jan-28-2020, 04:33 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020