Glad to help.

There is a more to 'n' than this, which comes into play when you have light passing through multiple layers but they don't include it on the syllabus these days.

I will post it if you like.

As to mathematical expressions, there are two common ways of doing this which you will need if you progress academically.

The usual coding for webpages is called HTML which stands for

HyperTextMarkupLanguage

Markup languages were used by printers to describe how to present [printed material.

Additional to the written material, they contain embedded instructions which don't show.

A word processor is a simple version of this.

The two methods used for Mathematical subjects are MathML and Tex or LaTex.

The good news is that there are free online editors for these where you choose symbols from a chart and assemble your formulae on the screen in front of you and then copy and paste into your document or a website like this one.

Here are a couple of good sites.

Online Latex Equation Editor - Sciweavers https://www.codecogs.com/latex/eqneditor.php
I suggest you experiment here with them.