UsageError: Cell magic `%%` not found

hello all
i am new python learner and i am learning via jupyter notebook
when learning IO with basic files
i am getting below error on jupyter notebook
UsageError: Cell magic %% not found
Please any one can help

Not sure what you’re trying to achieve here but this StackOverflow Answer explains a little bit why.

as far as I can tell “Cell magics” must always be at the top of a cell, the only documentation I can find describing this behavior is when I enter %magic into iPython (or a Jupyter notebook cell)