User Tools

Site Tools


basics

This is an old revision of the document!


Coding Basics

TO a large extent this will depend on what language is introduced first.

At times I have used CBM BASIC, PHP, Python or other languages to teach. The language iself is not so important because all the basic concepts are going to be the same. Whichever language I use, I will aim to also provide a python version as Python is the language I currently teach in. The reasons for that are diverse, as Python is not my first choice. But it is great for beginners.

Example Python Code ex1.py

a = 1
b = 2
c = a + b

if c >= a:
    print("C is bigger than A.")
else:
    print("A is bigger than C.")

Just Get PyCharm

Just get PyCharm. PyCharm is good.

The Command Line

You won't loose much time with an editor like nano. If you use automation such as a build system, the command line can be just one or two keystrokes away from an IDE. For many this is fine, but it can feel a little oldschool. Still, I have taught kids this way and it does not impact their learning.

Online IDE

You can run python in the browser at websites such as:

I don't reccomend this, but you can do it if you just want “python here, now” or can't install anything.

All else considered, if you can, just use PyCharm.

basics.1694154053.txt.gz · Last modified: 2023/09/08 06:20 by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki