Advertisement
Kribo

Halveringstid NN-6

Aug 3rd, 2020
360
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #Fasit:
  2. import numpy as np
  3.  
  4. #Funksjon for halveringstid.
  5. def h(t,p):
  6.     return  (np.log(0.5)/np.log(p/100))*t
  7.  
  8. #Be om verdiar for t og p.
  9. t = float(input("Kor lang tid har gått? "))
  10. p = float(input("Kor mange prosent står att? "))
  11.  
  12. #Skriv ut h(t,p).
  13. print("Halveringstida er ", h(t,p))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement