Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- import matplotlib.pyplot as plt
- def kd(kills, deaths):
- return kills/deaths
- kills = 7295
- deaths = 6054
- matches = 2766
- kd_new_list = []
- new_matches = 803
- x = range(0,30)
- for k in x:
- for d in [3]:
- kills_new = kills + new_matches*k
- deaths_new = deaths + new_matches*d
- kd_new = kd(kills_new,deaths_new)
- kdtuple = (kd_new, k, d)
- kd_new_list.append(kdtuple)
- y = [kdtuple[0] for kdtuple in kd_new_list]
- dt = np.dtype("float", "int", "int")
- kd_array = np.array(kd_new_list,dtype=dt)
- print(kd_array[np.where(kd_array[:,0] > 2)])
- plt.plot(x,y)
- plt.ylim(0,5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement