Python Forum
I found a problem with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I found a problem with Python
#12
The difference is Pedroski55 is not calling int() after using the addition or exponentiation operators. int(float) throws away the fractional part of the float and returns the remaining value as an int object. int(1.2) == 1. int(-1.2) == -1.

Using a list only changed the structure of the code, not the results.
Reply


Messages In This Thread
I found a problem with Python - by Lahearle - Jul-19-2023, 09:16 PM
RE: I found a problem with Python - by deanhystad - Jul-19-2023, 10:25 PM
RE: I found a problem with Python - by Pedroski55 - Jul-20-2023, 01:08 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 02:36 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 02:38 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 02:42 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 03:10 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 03:28 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 03:41 AM
RE: I found a problem with Python - by Pedroski55 - Jul-20-2023, 05:47 AM
RE: I found a problem with Python - by Lahearle - Jul-20-2023, 09:22 PM
RE: I found a problem with Python - by deanhystad - Jul-20-2023, 10:01 PM
RE: I found a problem with Python - by Pedroski55 - Jul-20-2023, 10:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Upgraded Python: Module no longer found - for Linux Curbie 8 1,525 Mar-05-2025, 06:01 PM
Last Post: Curbie
Question [SOLVED] Upgraded Python: Module no longer found Winfried 1 1,164 Jan-01-2025, 02:43 PM
Last Post: Larz60+
  How can I found how many numbers are there in a Collatz Sequence that I found? cananb 2 3,459 Nov-23-2020, 05:15 PM
Last Post: cananb
  Js2Py module not found problem Charliedactyl1 5 9,745 Jun-14-2020, 07:39 PM
Last Post: buran
  Package installed through Anaconda "not found" by Python zonova 0 3,108 May-08-2020, 11:50 PM
Last Post: zonova
  Python 36-32 problem encoding module not found mkgrtn 0 3,018 Apr-14-2020, 09:57 PM
Last Post: mkgrtn
  uising python zero with IDLE I get an error of 'module not found' Brian123 1 4,798 Apr-24-2019, 09:21 PM
Last Post: Yoriz
  How to fix error code 2 in python, “directory not found”? dav3javu 1 8,100 Apr-03-2019, 04:55 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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