School stuff
PSA: every passing grade is good enough. In real life nobody will care for your grades (unless you know that your grades will factor into some documented process - eg. a scholarship or getting to next level of education).
In IT nobody cares for your grades, even in the first job
Getting straight A average (or 5.0 in Poland) is like getting 100% achievement in a game. Nobody will care in a year...
School stuff
Learn for the sake of learning. If a subject is not interesting don't invest more time than needed to pass.
I wasted too much time memorising unnecessary stuff showed down on me by bad teachers.