For this Question: Find out how the data x and y are related i. e. positively, negatively or uncorrelated without using bulitin functions1st line: Space separeated values for x
2nd line: Space separated values for yPrint + if positively correlated, - if negatively co- related or 0 if uncorrelatedInput:
29 17 44 19 32 40 30 34 30 11 
47 40 21 31 12 40 35 18 28 31 
Output:
-
, I have written this Solution Code: import numpy as np
x=np.array([input().strip().split()],float).flatten()
y=np.array([input().strip().split()],float).flatten()
x_avg=np.mean(x)
y_avg=np.mean(y)
l=np.shape(x)[0]
cov=0
for i in range(l):
  cov+=(x[i]-x_avg)*(y[i]-y_avg)
cov=cov/(l-1)
val="0"
if(cov>0):
  val="+"
elif(cov<0):
  val="-"

print(val), In this Programming Language: Python, Now tell me if this Code is compilable or not?