#!/usr/bin/env python3
#Rossmo’s formula
import math
crimes=[(5,4), (6,3), (5,3), (7,3)]
phi=5
f, g= 2, 2
b=3
a=0
for j in range(10):
for i in range(10):
for crime in crimes:
equation= 0
distance= (i-crime[0])+(j-crime[1])
equation+= (phi/math.pow(distance, f))
numerator= (1-phi)math.pow(b, 8-f)
denominator= math.pow(2b-distance, g)
equation+= (numerator/denominator)
a+=equation
print(i,’,’, j,’: ', a)
a=0
Alguém sabe por que ta errado ?