Do these two expressions "to mess up an exam" and "to screw up an exam" mean the same, that is, to do an exam badly, or even not to get it through?
Thank you very much.
Please note I'm not a teacher nor a native speaker;
Messed up and screwed up are synonyms and yes they mean the same in your examples .
There is a difference in the register. Screwed up is slang term whereas messed up is more neutral.