Kribo

Halveringstid NN-2

Aug 3rd, 2020
465
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #Funksjon som gir kor mange prosent som er igjen av stoffet etter t tid.
  2. def p(t,h):
  3.     return  0.5**(t/h)*100
  4.  
  5. #Be om verdiar for t og h.
  6. t = float(input("Kor lang tid har gått? "))
  7. h = float(input("Kva er halveringstida? "))
  8.  
  9. #Skriv ut p(t,h).
  10. print(p(t,h), "% står att av opphavleg mengd.")
Advertisement
Add Comment
Please, Sign In to add comment