Advertisement
calcpage

2016AB2a.py

Jun 23rd, 2016
1,119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement