Dear Student,
According to IUPAC,
ΔU = Q + W ,
When heat is transferred into the system , Q = positive
When heat is transferred out of the system , Q = negative
When work is done on the system , W = positive
When work is done by the system , W = negative
Regards