Python Forum

Full Version: Need help with code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so i have this code but it wont seem to work can anyone help me?

# Enter Data
tag=raw_input("Enter Discord Tag ")
import time
import progressbar

bar = progressbar.ProgressBar()
for i in bar(range(100)):
    time.sleep(0.04)
print('Found Discord Tag')
usrid=raw_input("Enter User")
import time
import progressbar

bar = progressbar.ProgressBar()
for i in bar(range(100)):
    time.sleep(0.10)
print('Found User ID'), usrid
input('Press ENTER to exit')
But then it comes up with this.

Traceback (most recent call last):
  File "C:\Users\user\Desktop\resolver.py", line 2, in <module>
    tag=raw_input("Enter Discord Tag ")
NameError: name 'raw_input' is not defined
Can anyone help me please
"raw_input" (Python 2) has been renamed to "input" in Python 3, which you appear to be using. So just change the function name to input.
ahh thanks fixed it.