0

I've tried running my fourth code on python and I have encountered an error that I can't seem to fix.

I tried to change around the apostrophes but it hasn't helped me.

message = 'Muhammed Ali once said, "Do not count the days, make the days count".'
    print(message)

I get an error message on the terminal that says

'.' is not recognized as an internal or external command, operable program or batch file.


(program exited with code: 9009)

  • 3
    I don't see the error. other than indentation problem there is no error in this code – Mehdi Jun 30 '19 at 23:00
  • There's a grievous grammar error but no Python error other than indentation. – TomServo Jun 30 '19 at 23:05
  • 2
    That's not a Python error. That's an error in your batch file/console that you're running `python` from. You have a loose period at the start of your command, like `. python "yourfile.py"`. – Carcigenicate Jun 30 '19 at 23:07
  • Check this link https://stackoverflow.com/questions/1351830/what-does-exited-with-code-9009-mean-during-this-build to fix the 9009 error – Ghassen Jun 30 '19 at 23:10
  • 1
    It looks like you tried to run your code in something other than a Python interpreter. On a shell maybe? – Klaus D. Jun 30 '19 at 23:11

2 Answers2

1

This code seems completely fine. It's just the indentation at the beginning of the second line that is unnecessary - it might be what's ruining your code. Try re-writing it like so:

message = 'Muhammed Ali once said, "Do not count the days, make the days count".'
print(message)

This should work.

E. Epstein
  • 739
  • 2
  • 11
  • 26
0

I've found the solution, sorry for bothering everyone. I had saved the files without using the .py extension which messed up the code.

Thank you everyone for trying to help!

  • Well, that shouldn't make a difference. Depending on the operating system. If on linux, add `#!/usr/bin/env python` in the frst line, that should fix it. or `#!/usr/bin/env python3`. – Finomnis Jun 30 '19 at 23:14