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 Coding Question: Exit Program Command? RockBlok 3 504 Nov-19-2023, 06:31 PM
Last Post: deanhystad
  [solved] Basic question on list matchiing paul18fr 7 1,809 May-02-2022, 01:03 PM
Last Post: DeaD_EyE
  Very basic calculator question BoudewijnFunke 4 1,884 Dec-10-2021, 10:39 AM
Last Post: BoudewijnFunke
  basic question isinstance tames 5 2,773 Nov-23-2020, 07:20 AM
Last Post: tames
  basic question about tuples and immutability sudonym3 6 2,828 Oct-18-2020, 05:11 PM
Last Post: sudonym3
  [split] Very basic coding issue aary 4 2,416 Jun-03-2020, 11:59 AM
Last Post: buran
  Very basic coding issue mstichler 3 2,553 Jun-03-2020, 04:35 AM
Last Post: mstichler
  Regarding question on coding asmfloyd 2 1,925 May-26-2020, 08:02 AM
Last Post: buran
  Basic Pyhton for Rhino 6 question about variables SaeedSH 1 2,107 Jan-28-2020, 04:33 AM
Last Post: Larz60+
  Basic example Coding gudlur46 2 2,003 Dec-19-2019, 01:55 PM
Last Post: gudlur46

Forum Jump:

User Panel Messages

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