Machine learning task_week2_LR r

HELLO EVERYONE!
WOULD ANYONE HELP ME TO SOLVE THIS PROBLEM I HAD IN THE CODE, I COULDN’T SOLVE IT

{moderator edit: code removed}

Please don’t post your code on the forum. That’s not allowed by the course community standards.

Look at your code carefully:

  • You’re computing a value for total_cost.
  • Then you erase the value by setting total_cost to zero.

Why?

i didn’t see it at all, thank you for help