What to do when my code refuses to work

What to do when my code refuses to work and my profs code and instructions are also wrong b/c he's a math prof and not a cs prof and I'm going crazy
What to do when my code refuses to work and my profs code and instructions are also wrong b/c he’s a math prof and not a cs prof and I’m going crazy

Take a deep breath and go talk to your professor. Ask them what you’re missing in the instructions and in the course of that conversation one or the other of you will figure out what the problem is. It’s a variation on rubber duck debugging.