See, you are very lucky that you have a background in engineering. Engineers as teachers are highly regarded and sought-after. Since your graduation subjects were in Physics and Computers, then you definitely have the capability to teach both Physics and Computer Science.
And Teaching both subjects will also fetch you a higher salary. So, the key takeaway is that YES, you can definitely teach both the subjects. Hope I have answered your question. All the best!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile