Advertisement
davide1409

pitagora

Nov 19th, 2019
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def pitagora(cat1, cat2) :
  2. # @param cat1 : float (primo cateto)
  3. # @param cat2 : float (secondo cateto)
  4.   print 'valore primo cateto: ', cat1
  5.   print 'valore secondo cateto: ', cat2
  6.   cat1 = cat1**2
  7.   cat2 = cat2**2
  8.   ipo = sqrt(cat1+cat2)
  9.   print 'valore ipotenusa: ', ipo
  10.  
  11.  
  12.  
  13. a = 4
  14. b = 3
  15. pitagora(a, b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement