So I just did Problem Set 0 but I wrote the code in Notepad and ran it using the cmd option in "Run" in windows. The code worked perfectly well, but when I ran it in Python it would close abruptly without running the last string. Can anyone help me with: 1. Are we supposed to write the code in Notepad? I was not able to locate IDLE in the Python folder. 2. Why am I getting an error when running in Python?
Notepad and IDLE are both plain text editors. IMO, Notepad is better. From your point of view the files that they produce are identical. I was using XCode's editor for most of the course. You may not be getting any error. The window may be closing before you see the last string. One way to test this would be to put a line like: raw_input( "" ) Will delay the end of the program until you press return.
Idle is located for example "C:\Python27\Scripts\idle.exe". Maybe there are indentation issues, that you can't perceive on notepad.
awesome, got it. I ran it again in the Python Shell and it was fine. Thanks for the clarification!
Join our real-time social learning platform and learn together with your friends!