How are the short answer questions scored?

Microsoft uses exact string matches. Although they try to include all variations of formatting and code usage that could be considered correct, it’s possible that some are not included. This is why they include several ways to check your syntax.
 
Microsoft provides a syntax checker that you can use to validate the syntax of your code (such as SQL commands) and values (such as table names and variable names) used in your solution. Any syntax errors appear in the window next to the Check Syntax button. You may change your code and re-validate the syntax as many times as you want.
 
Note that the syntax checker does not validate whether you have answered the question correctly; it simply validates the accuracy of your syntax.