jeudi 19 août 2021

why the code is not getting pass the hidden test cases even though its out put is correct?

Conditional<- function(V)
{
Ab<-c()
For(i in 1:length(V){
If(V[i]>=80){
ans<-"Above_average"
}
else{"
ans<-Average"
}
Ab<-append(ab,ans)
}
Paste(ab, collapse=' ')
}
Conditional (c(70,80,89))

the output which i got was as follows "Average above_average above_average".still do not know,what is the problem?

Aucun commentaire:

Enregistrer un commentaire