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
#10
Ah, pick another letter, not e for Euler's number!

Is this what you expect?

mylist = [27, 84, 110, 133]
e = 0
for num in mylist:
    e = e + num**5
    print('e is', e)
    print('e**0.2 is', e**0.2)
    Z = e**0.2
    print('Z is', Z)
    if Z == e**0.2:
        print('e**0.2 and Z are the same!')
Output:
e is 14348907 e**0.2 is 27.000000000000004 Z is 27.000000000000004 e**0.2 and Z are the same! e is 4196468331 e**0.2 is 84.05756207758672 Z is 84.05756207758672 e**0.2 and Z are the same! e is 20301568331 e**0.2 is 115.2141759184629 Z is 115.2141759184629 e**0.2 and Z are the same! e is 61917364224 e**0.2 is 144.00000000000003 Z is 144.00000000000003 e**0.2 and Z are the same!
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,629 Nov-23-2020, 05:15 PM
Last Post: cananb
  Js2Py module not found problem Charliedactyl1 5 8,112 Jun-14-2020, 07:39 PM
Last Post: buran
  Package installed through Anaconda "not found" by Python zonova 0 2,382 May-08-2020, 11:50 PM
Last Post: zonova
  Python 36-32 problem encoding module not found mkgrtn 0 2,507 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,999 Apr-24-2019, 09:21 PM
Last Post: Yoriz
  How to fix error code 2 in python, “directory not found”? dav3javu 1 7,152 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