Advertisement
Guest User

Untitled

a guest
May 25th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. def calculate_jam_chance(C,J,S,N):
  2. jam_chance = (1 - (1 - jam_strength / sensor_strength) ^ num_jammers) * 0 + 100
  3. print(jam_chance)
  4.  
  5.  
  6.  
  7. #Constants
  8. jam_chance = 0.0
  9. jam_strength = int(input("What is your jam strength? ->").strip())
  10. sensor_strength = int(input("What is the sensor strength of the ship you're trying to jam? ->").strip())
  11. num_jammers = int(input("How many jammers do you have? ->").strip())
  12. calculate_jam_chance(jam_chance,jam_strength,sensor_strength,num_jammers)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement