Sonzaschool
Back

O-Level · Secondary 3

ICT

Similarities and Data Types

about 6 minutes to read

Discussions
Topics in this sectionProgramming Languages2 topics
  1. Types of Programming Languages
  2. Similarities and Data Types

Programming Concepts and Data Types

When we write a program, we need to understand two important things: what all programming languages have in common, and how to work with different kinds of information. This note explains both of these ideas.

No matter which programming language you use—whether Python, C, Java, or JavaScript—you will find that every program does four basic things:

Input means getting data into your program. This could be typing your name on a keyboard, scanning a barcode, or receiving data from a sensor. In a simple program, input might be asking a user to enter their age or the price of sorghum at the market.

Output means showing or sending information out of your program. This could be displaying text on the screen, printing a receipt, or saving results to a file. For example, when a program displays "Welcome to Juba Market" on the screen, that is output.

Variables are like labelled containers that store information while your program runs. You give each variable a name so you can use it later. For instance, you might create a variable called price to store the cost of a bag of groundnuts, or temperature to store today's weather reading from Malakal.

Sequence means that statements in a program run in order, one after another. The computer reads your code from top to bottom, just like reading a story. If you want to change the order, you use special commands like loops or decisions.

These four ideas—input, output, variables, and sequence—are the building blocks of every program, no matter which language you choose.

Question

Which four actions are common to all programming languages, no matter which one you use?

Sign in to submit your answer and have it count toward your mastery.

Sign in to practice

Tutor

Stuck? Ask me anything about this topic.

Sign in to ask the Sonza AI Tutor about this question.

Sign in to ask

Discussions

No questions yet

Sign in to ask
Loading discussions…