Demo entry 6644466

euler

   

Submitted by anonymous on Oct 04, 2017 at 01:31
Language: Python. Code size: 201 Bytes.

import math

def euler():
    x = 0
    h = 0.01
    f = math.cos(x) + 0
    for i in range(100):
        t = (i + 1) * h
        x += f * h
        f = math.cos(x) + t
    print x

euler()

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).