What is Programming?
Programming is like telling a computer, "Do this job this way!"
.
Computers are very intelligent machines, but they do not understand human languages such as English or Spanish.
Programming is the task of converting human language, which is composed of letters, into a language that computers, which understand 0s and 1s, can work with.
So, What Does the Term "Program" Mean?
Computers do not think for themselves; they execute given commands exactly.
To make the computer perform the tasks we want, we need to write those tasks as clear and precise Instructions
.
A program is a set of these instructions that follow a series of procedures to tell the computer what to do.
What is Inside a Computer Program?
A computer program consists of Code
that directs the computer with instructions.
The instructions written in code perform specific tasks, and together they form a program that carries out a particular function.
The example below instructs the computer to display the sentence "Hello, World!"
on the screen.
# Display the sentence "Hello, World!" on the screen message = "Hello, World!" print(message)
In Python, to display the result of the tasks performed by the program on the screen, you use the print()
function, placing the value you want to print inside the parentheses ( )
.
Notes
-
Invoking specific functions using parentheses is called a
Function
, andprint()
is one of the built-in functions provided by Python. -
The parts starting with
#
are called comments, and they do not affect the execution of the program. Comments are used to explain the code or add necessary information.
Programming is the task of translating human language into a language that computers can understand.
Lecture
AI Tutor
Publish
Design
Upload
Notes
Favorites
Help
Code Editor
Execution Result