add
and sub
for addition and subtraction.calc.py
on your desktop.calc
module. This file should import the module and call its functions.
Save this as main.py
.calc
module to your main program.main.py
file, add the following import statement:
Alternatively, if you only want to import specific functions, such as add
, you can do:cd
command to navigate to the folder.
This will execute the main.py
file, and you will see the output of the add
and sub
functions printed to the screen.math.sqrt()
for square roots).pip
.import
statement.