Programming and Programming Languages

Discover the magic of programming—the art of giving computers step-by-step instructions! From beginner-friendly Python and Scratch to powerful C++ and JavaScript, this guide introduces popular programming languages and their superpowers.

1. What is Programming?

Programming is like writing "magic instructions" for a computer!

Computers are smart, but they can’t think on their own. You need to tell them what to do and how to do it.

For example, if you want a computer to draw a kitten, create a game, or solve a math problem, you must write the rules using a programming language.

🌰 Example:

If you say to your mom, “Please get me a glass of water,” she’ll understand and do it.

But if you say the same thing to a computer, it will just be confused: “???”

So, we use a language that computers understand—a programming language—to write instructions, such as:

Python:

print("Please give me a glass of water!")  # This is how you write it in Python

C++:

cout << "Please give me a glass of water";

2. Programming Languages

Programming languages are the way humans communicate with computers.

Just like humans speak Chinese, English, or French, there are many programming languages! Here are some common ones:

🐍 Python

  • Features: Simple, reads like English!
  • What it can do: Create games, draw graphics, solve math problems, and even control robots!
  • Example
# Make the computer print "Hello, World!"
print("Hello, World!")

🟢 Scratch

  • Features: Learn programming with building blocks—no typing required!
  • What it can do: Create animations and small games (like Cat and Mouse).

Example:

🔵 JavaScript

  • Features: Makes web pages interactive!
  • What it can do: Web games, bouncing animations, interactive buttons.
  • Example:
// Pop up "Hello!" when a button is clicked
alert("Hello!");

🔴 C Language

  • Features: Like the basic building blocks of Lego—many systems are built with it!
  • What it can do: Write operating systems (like Linux), control robots, and build high-performance programs.
  • Example:
#include <stdio.h>
int main() { 
    printf("Hello, World!\n");  // Print a message  
    return 0;
}
  • Fun Fact:
    Your phone, computer, and even microwave may contain code written in C!
    Learning C makes it much easier to learn other languages later.


🟣 C++

  • Features: C language + superpowers (object-oriented)!
  • What it can do: Large-scale games (like World of Warcraft), scientific computing, 3D graphics.
  • Example:
#include <iostream>
using namespace std;
int main() { 
    cout << "Hello, World!" << endl;  // Similar to C, but more advanced  
    return 0;
}
  • Fun Fact:
    Many game engines (like Unreal) are written in C++—learn it and you can create awesome games too!
    It’s “smarter” than C and lets you create virtual characters (using classes and methods).

💡 Did You Know?

  • Most of the Windows operating system is written in C/C++!
  • The first C++ program was born in 1983! 👨‍💻

Subscribe to CodeEachDay

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe