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. However, out of all the major languages, Python has the least amount of things you need to learn before you can look at a program. Python is not my first choice, But it is great for a basic programming course. However, I don't think that it is valuable to use python beyond the second year of a computer science course. Once you understand all the basic concepts, relearn them in C, C++ or Java. We'll worry about that later. For now, what do you think the following program does?

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.1694434111.txt.gz · Last modified: 2023/09/11 12:08 by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki