SHARE
TWEET

2016AB2a.py

calcpage Jun 23rd, 2016 (edited) 737 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/usr/bin/python
  2. #MrG 2016.0622 2016AB2
  3. #2a) particle is slowing down
  4. from math import sin
  5. from turtle import *
  6.  
  7. def f(t):
  8.     return t**2+sin(3*t**2)
  9. print f(4)
  10.  
  11. def diff(t,h):
  12.     return (f(t+h)-f(t))/h
  13.  
  14. for x in range(7):
  15.     print diff(4.0,10**-x)
RAW Paste Data
Top