Hello World in Spyder
It is a tradition that your first program simply print "Hello World" or in Python perhaps "Hello Universe" or "Hello Monty". In Python this is really easy:
print "Hello World"
So in this task you just want to get the above into a file and run it. Simple but how?
- Open Spyder
- Create a Project
- Create a file, perhaps called hw.py
- Run the file
Of course I have left out some details. Is there help out there on the web ( but like the Spyder install, this may be a good in person, in class activity )
In Python 3 there has been a small update to print, it has been made a function. This just adds a pair of parenthesis to hello world. And it works fine in Python 2.7. So it is good to code this way, your code will be ready for the Python 3 upgrade.
print( "Hello World" )
It is also good to get acquainted with functions early in you programming life, they are meat and potatoes in the world of programming. More at Python Functions
- Python with Spyder 1: First Steps – DataScienceSource.com Video => a very complete discussion. Includes discussion of conda which help you update Spyder ( and Anaconda ) which is nice, but probably not a bit deal, you could skip till later. This is a page early in another course on Python.
- 04 Python Programming , Write your first python script with Best Python IDE's | by Chitrank Dixit - YouTube => Video How to write your first program in a bunch of different IDE's. May be more than you want to know.
- Class 3 - Installing Spyder and first program. | Elementary Engineering Text => Install on Linux ( mostly useful if you have Linux ) and Run of hello world, good for any system.
- Spyder - the Python IDE — Computational Modelling Blog Text => covers the material seems overly complicated. But who knows may suit you.
- a first Python program in Spyder - Google Search Text => Google it for lots more links.