Welcome to programming world, make sure that you have these correctly:
1- Spelling of the import, it should be import random.
2- Make sure the indentation correctly done by using the tab button.
3- Make sure that your file.py should not be random.py this will raise some issues related to the random module.
Hi Max! The suggestions provided in the other comments cover the most likely scenarios - be sure to let us know what happens! We'll be happy to jump in and help get you rolling again, if those ideas don't solve the problem - we'll just need a little more detail about what you're seeing if that's the case!
I am making a random guess here for the error as getting syntax error for an import is unusual.
Make sure you are importing random at the top of your file i.e. first line.
Second, check if you have name your .py file as random.py
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (3)
Welcome to programming world, make sure that you have these correctly:
1- Spelling of the import, it should be
import random
.2- Make sure the indentation correctly done by using the tab button.
3- Make sure that your file.py should not be
random.py
this will raise some issues related to the random module.Hi Max! The suggestions provided in the other comments cover the most likely scenarios - be sure to let us know what happens! We'll be happy to jump in and help get you rolling again, if those ideas don't solve the problem - we'll just need a little more detail about what you're seeing if that's the case!
I am making a random guess here for the error as getting syntax error for an import is unusual.
Make sure you are importing random at the top of your file i.e. first line.
Second, check if you have name your .py file as random.py