My code is acting weird
Go to solution
Solved by Mira Yurizaki,
The problem starts on line 43 of the mathtest module. If you intended the code to run inside the mathtest function, you need to indent the code. Otherwise it's out of the function's scope and mathtest is a function that does nothing. And since the scope outside of the function definition is basically the global scope and what I said earlier, Python will execute that code the moment you import the module.

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now