High school Attendance HELP ASAP

I’m in high school and in march 4 or 14 I’ll be done with HS because I will have all my credits but I think I’m going to fail because of many absences. English Language Art i pass that class already so I don’t need it but for Spanish i need 1 credit and for gym 1 credit. The reason why i have 2 periods of gym is because i entered in the “middle of the cycle”and i put this like this because i enter like 1 week before start the middle of the cycle. January 29 was the day that students can earn a just .5 till march 4 or 14 but later I have more absences. I heard that a student can’t fail the class just for attendance. I need help what can i do?