Home > Net >  Run project on google colab
Run project on google colab

Time:01-16

Am trying to run a calculator project on google colab but i don't know how to set up my file structure i think. i have two files,

  1. calculator.py
  2. test_calculator.py

i have an import statement on test_calculator that imports the calculator .py into it to run the test, but google colab does not see the calculator .py on my notebook i don't know if my structure is wrong

calculator.py code

error on the test_calculator.py

CodePudding user response:

You don't need import if they are in the same Notebook but different cells. Just call it without importing. What matters is that you run the first cell before the second so that the function gets defined.

  • Related