Advertisement
Sanlover

Untitled

Nov 10th, 2021
813
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. import math
  2.  
  3. print('        x       sin(x)     cos(x)')
  4. print('--------------------------------------')
  5. for i in range(0, 11):
  6.     x = 0.0 + float(i)/10
  7.     print('     ' + '{0:.4f}'.format(x) + '     ' + '{0:.4f}'.format(math.sin(x)) + '     ' + '{0:.4f}'.format(math.cos(x), 4))
  8. print('--------------------------------------')
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement