Python run times

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • theroflchopper
    New Member
    • Oct 2009
    • 5

    Python run times

    I have to state running times using the big-O notation. I'm not sure how you do this

    Code:
    x = 0
    a = 6
    b = 6
    c = 1
    for i in range(2*n):
         x = x + c
         c = c + b
         b = b + a
    print x
    Could someone give me a hint on how I should approach this problem?
    Last edited by bvdet; Oct 23 '09, 10:32 PM. Reason: Changed quote tags to code tags
  • kaarthikeyapreyan
    New Member
    • Apr 2007
    • 106

    #2
    Is it that your are look for the performance metrics of the loop that you are running ? there are a lot of profiling tools that are available for getting the runtime states of the python program.

    Comment

    Working...