Explicit & implicit Euler and trapezoid method of ODE solving in Python
I have a question regarding my code. I have to solve an ODE [y′(t)=(0.5−t)(y(t) + 1), y(0) = 1] numerically (and approximate), using the explicit and implicit Euler as well as the trapezoid method and I used Python for it. To me it looks fine, but when comparing to my classmates results the values differ and none of us know the right answer. Have I implemented the three methods in the right way? The code below is what I tried.