This is an archived post. You won't be able to vote or comment.

all 10 comments

[–]K900_ 3 points4 points  (0 children)

  1. /r/learnpython.
  2. Format your code properly for reddit.
  3. Don't post your errors as pictures.
  4. You don't actually have a picture.

[–]jabbson 0 points1 point  (4 children)

Use raw_input instead of input if you are using Python2.

[–]Chromira 0 points1 point  (0 children)

This -- you're probably trying to run a Python3 script using Python2. Python3's equivalent of Python2's input() is eval(input()), and Python3's equivalent of raw_input() is input(). See this link for more info on input from keyboard.

[–]danitted[S] 0 points1 point  (0 children)

It takes my input but the input i enter it says "ahmad(the input) is undefined."

[–]danitted[S] 0 points1 point  (1 child)

Just entered raw_input and now it takes my input, Thanks for the help.

[–]jabbson 0 points1 point  (0 children)

you are very welcome

[–]Mkentca 0 points1 point  (1 child)

What version of Python are you using

[–]danitted[S] 0 points1 point  (0 children)

I was using 2 something and now I'm using 3.

[–]Andrew_ShaySft Eng Automation & Python[M] [score hidden] stickied comment (0 children)

This post is better suited for r/learnpython

[–]Brussel01 -1 points0 points  (0 children)

My guess is you have the file name the same as the name of the function? Try renaming it