I start PyCharm and click (File | New Project). Create.
Anyway, I need somewhere to put my code. On Youtube I found a video by Ryan Burmeister that seems to be about what I'm looking for.
I too set my color theme (I thought I did this in the startup configuration?) to Darcula (Shift+Alt+S | Appearance & Behaviour | Appearance).
Press Ctrl+Insert to popup a New-list in which you choose to create a new file (just press Enter).

I'm naming it "main.py". I don't know if PyCharm puts the ".py" there by itself if I wouldn't do it, but it's good practise to do it. One day maybe I'm using another IDE in which it doesn't do it automatically. OK.
Thanks to the auto code folding, to write "print("Hello World")", all I had to type on the keyboard was "print("Hello World". The bracket and quote closed off itself.
To run my first Python program, I now use what I learned from Tip of the Day and press Alt+Shift+F10 and then Enter on "main". This will not only run the code, but PyCharm will make this code the "current code to Run" which can be invoked by either pressing Shift+F10 or the green Play button in the upper right corner.
No comments:
Post a Comment