Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix magic8.py error #1474

Open
codeerfreak opened this issue Aug 28, 2024 · 2 comments
Open

Fix magic8.py error #1474

codeerfreak opened this issue Aug 28, 2024 · 2 comments

Comments

@codeerfreak
Copy link

The code for magic8.py uses the Python random library without importing it. This causes issues during runtime.

@Br1tBreaker
Copy link

Rookie mistake, innit? Can't be messing about with the random library without giving it a proper invite to the party. That's gonna throw a right spanner in the works when you try to run the code. You'll be getting all sorts of nasty errors popping up, mate.

Remember, always import random at the top of your Python file before you start conjuring up any magic with it. It's the polite thing to do, and it'll save you a lot of headaches down the line.

@codeerfreak
Copy link
Author

Thanks for the info. Yeah i am very new.
I did add import random at the top of the Python file though. Or maybe i forgot to "add the file"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants