anonymous
  • anonymous
Is there a way to repair an error in a program without rewriting the entire program?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
chris
  • chris
julie
  • julie
hey, you may be confusing the interactive interpreter (write successive commands in a prompt) with running a python text file. the command line style python interpreter is great for testing out language constructs quickly. however, once you move on to more complex programs you'll often want to create a text file that holds your python commands. the convention in python is to create a text file with the extension ".py", e.g. "prime.py" that holds the same commands you type into your interpreter. from a command line, you can then run the program with "python ". That way if there are errors, you only have to change the line in your text file that caused the error - not type the whole thing again. take a look at this if you have more questions: http://docs.python.org/faq/windows.html#how-do-i-run-a-python-program-under-windows
chris
  • chris
what julie said

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

chris
  • chris
if you're on unix, then you can do > python ps1.py
anonymous
  • anonymous
In addition, on unix, you can add a "shebang" line like this to the beginning of your program: #! /usr/bin/python Then you can make your program executable with "chmod +x ps1.py", and then execute it directly with ./ps1.py. This method is used by most system maintenance scripts. On Windows you can make an association with the .py file extension to make Python open all such files. Windows would ignore the shebang line, resulting in one file that might work on Unix/Linux, Windows, and OS X.
anonymous
  • anonymous
Thanks Julie and others, That was exactly the confusion I had and your help solves the problem.

Looking for something else?

Not the answer you are looking for? Search for more explanations.