Python Forum
Def code does not work for negative integers.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Def code does not work for negative integers.
#2
I would test against the absolute value of x (abs(x)) instead of just x.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: Def code does not work for negative integers. - by ichabod801 - Oct-31-2019, 11:00 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  negative memory usage akbarza 1 232 Apr-27-2024, 08:43 AM
Last Post: Gribouillis
  hi need help to make this code work correctly atulkul1985 5 851 Nov-20-2023, 04:38 PM
Last Post: deanhystad
  newbie question - can't make code work tronic72 2 732 Oct-22-2023, 09:08 PM
Last Post: tronic72
  Beginner: Code not work when longer list raiviscoding 2 865 May-19-2023, 11:19 AM
Last Post: deanhystad
  Why doesn't this code work? What is wrong with path? Melcu54 7 1,898 Jan-29-2023, 06:24 PM
Last Post: Melcu54
  Code used to work 100%, now sometimes works! muzicman0 5 1,527 Jan-13-2023, 05:09 PM
Last Post: muzicman0
  color code doesn't work harryvl 1 938 Dec-29-2022, 08:59 PM
Last Post: deanhystad
  Something the code dont work AlexPython 13 2,359 Oct-17-2022, 08:34 PM
Last Post: AlexPython
  cannot get code to work Led_Zeppelin 10 2,526 Jun-30-2022, 06:28 PM
Last Post: deanhystad
  is there any tool to convert negative base to int? Skaperen 7 2,465 May-27-2022, 07:30 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

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