To check grammars in a sentence and to check for correct sentence in English, there is an online available tool known as Grammer Checker by Ginger . You can paste your sentence in the text box and get the suggestions on what words are need to be corrected.
Your sentence:When we buy a computer
After Grammer Check:Result sentence: When we buy a computer
Visit the website to use the tool : Grammar Check by Ginger Software