Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Definitions – Programming

Bug [2]
In programming, a bug is a mistake in the code.
Input [2]
In programming, input is data/informati on provided to a program,
for example someone typing or using the mouse.
Variable [2]
In programming, a variable is like a box that can store
data/informati on.
Assignment [3]
Assignment is the act of saving informati on into a variable. We
usually use the equal sign (=) to do this.
Data type [2]
The data type is the kind of informati on/how informati on is
represented digitally in a variable.
String (and 1 example) [3]
A string is a data type used to store lett ers, numbers and/or
symbols. It is always surrounded by quotati on marks (dấu ngoặc
kép) e.g. "hello123"
Integer (and 1 example) [3]
An integer is a data type used to store whole numbers.
e.g. 1, 5, 40, 0, -1, -4
Float / Real (and 1 example) [3]
A fl oat or real is a data type used to store decimal numbers. e.g.
1.5, 100.002, 5.0
Boolean [2]
A Boolean is a data type used to store True or False.
Boolean Expression [2]
A Boolean expression is a statement that can be
evaluated/calculated to either True or False.
Comparison Operator [1]
A comparison operator is the symbol or symbols usually found in a
Boolean expression, that is used to compare two pieces of data.
e.g. a == b checks if a and b are the same.
e.g. m != n checks if m is diff erent to n.
e.g. x >= y checks if x is greater than or equal to y.
Selection / Conditional Statement / if Statement [2]
In programming, this is code which contains a Boolean expression
and only runs depending on whether it is True or False . For
example:
if a > 5:
Loop [1]
In programming, this is code that repeats. In python, two ways of
creati ng a loop are:
for a in range(3):
and
while(True):
Indentation (and 1 example) [2]
Indentati on is what we call code that has been pushed in. We use
this to group code together.
For example:
fish = 100
if fish < 50:
print("Not")
print("enough")
print("fish")
print("Let’s go shopping")
This code only prints "Let’s go shopping".
"Not", "enough", "fi sh" are grouped together by the indentati on
and all skipped because fish < 50 is false.
Function (and 1 example) [2]
In programming, a functi on is code that performs a task or set of
tasks.
e.g. print() is a functi on that displays something on the screen.
e.g. int() is a functi on that converts something into an integer.
Parameter [2]
In programming, a parameter is a value that is provided to a
functi on which adjusts/changes/informs what the functi on does.
e.g. print("Hi",name) … the parameters are the string "Hi" and
the variable name.

You might also like