Python Forum
In need help to put this code in order
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
In need help to put this code in order
#5
The last function should read

def E_erlang(Gos, A0):
    a = 0
    b = n
    c = 0
    Gos_c = Gos_erlang(c, n)
    while abs(a - b) > 0.000001:
        c = (a + b) / 2
        if Gos_c < Gos:
            a = c
        else:
            b = c
    return Gos_c
Also when you do this:
print('Capacity :', c)
c isn't defined anywhere.
Reply


Messages In This Thread
RE: In need help to put this code in order - by loomski - Apr-11-2019, 05:50 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help!! Order form and receipt code beginner1996 2 3,309 Mar-07-2019, 03:22 PM
Last Post: beginner1996
  Write a code to output in alphabetical order AbdelaliPython 1 4,639 Jan-19-2018, 09:03 PM
Last Post: j.crater

Forum Jump:

User Panel Messages

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