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
#1
So I read that Python no longer uses long conversions and all are longs with an "int" format

I found an odd problem reading these forums, it's as goes:

find if A is == to e**0.2:

a = 27
b = 84
c = 110
d = 133
e = (int(a**5 + b**5 + c**5 + d**5))
Z = (int(e**0.2))

#####print(e, a ,b)##### avoid due to it incrementing stacks

if Z == a**5:
print("yes")
print(a**5) #for checking the value anyway

if Z != a**5:
print("no")
print(a**5)
print(Z)
print(e)

This will print NO because the SUMMATION of e in Z becomes rounded to 144 SHORT. But we can still see that by printing A**5 it converts it into a long.
I think this is because when the values of e are exchanged to Z it forces it into a short.

I would convert to a long but those are not available. I tried Int Z, tried adding 000000000000000000 to first of e(dumb probably).

Just tried: if e**0.2 == a**5: and it is still no. This telling me it comes from the problem e**0.2 converting it into short most likely.

plz fix
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
  How can I found how many numbers are there in a Collatz Sequence that I found? cananb 2 2,584 Nov-23-2020, 05:15 PM
Last Post: cananb
  Js2Py module not found problem Charliedactyl1 5 8,017 Jun-14-2020, 07:39 PM
Last Post: buran
  Package installed through Anaconda "not found" by Python zonova 0 2,341 May-08-2020, 11:50 PM
Last Post: zonova
  Python 36-32 problem encoding module not found mkgrtn 0 2,469 Apr-14-2020, 09:57 PM
Last Post: mkgrtn
  uising python zero with IDLE I get an error of 'module not found' Brian123 1 3,955 Apr-24-2019, 09:21 PM
Last Post: Yoriz
  How to fix error code 2 in python, “directory not found”? dav3javu 1 7,092 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