Docsity

Programming Terms and Codes: Definitions and Uses, Assignments of Programming Languages

Toggle sidebar
bg1
Nikko DC Estores March 04,2021
BSME-1N
Assignment 2:
1. Please research for the definition of the following programming terms:
> Value: In mathematics, logic, and computer programming, a value is a definite object. For
example, the number 1, the letter a, and the unique combination of letters that forms the word
apple are all values. In a computers, a value is usually a number, a single character, or a string
of characters.
> Type: In computer science, the type is a quality of data that defines the possible values
the data may have. Depending on its type, a unit of data will be stored and operated upon in
different ways. Examples of data types include integers, booleans, and strings.
> String: A string is any series of characters that are interpreted literally by a script. For
example, "hello world" and "LKJH019283" are both examples of strings. In computer
programming, a string is usually attached to a variable as shown in the example below.
> Integer: An integer is a positive or negative whole number. Examples of positive
integers are 1, 2, 3, and 4. Examples of negative integers are -1, -2, -3, and -4. The number 0 is
also considered an integer even though it has neither a positive or negative value. In most
programming languages, you can convert a number into an integer using the int function.
> Float: With CSS (Cascading Style Sheets), float is a property that is used to help
position elements on a web page. For example, on this page an image is displayed on the
right-side of this block of text. An image may be floated by using the img element with the
CSS property float, as shown in the HTML/CSS code below.
> Floating point: a floating-point or float is a variable type that is used to store floating-
point number values. A floating-point number is one where the position of the decimal point
can "float" rather than being in a fixed position within a number. Examples of floating-point
numbers are 1.23, 87.425, and 9039454.2
pf3

Partial preview of the text

Download Programming Terms and Codes: Definitions and Uses and more Assignments Programming Languages in PDF only on Docsity!

Nikko DC Estores March 04, BSME-1N Assignment 2:

  1. Please research for the definition of the following programming terms:

> Value: In mathematics, logic, and computer programming, a value is a definite object. For

example, the number 1, the letter a, and the unique combination of letters that forms the word apple are all values. In a computers, a value is usually a number, a single character, or a string of characters.

> Type: In computer science, the type is a quality of data that defines the possible values

the data may have. Depending on its type, a unit of data will be stored and operated upon in different ways. Examples of data types include integers, booleans, and strings.

> String: A string is any series of characters that are interpreted literally by a script. For

example, "hello world" and "LKJH019283" are both examples of strings. In computer programming, a string is usually attached to a variable as shown in the example below.

> Integer: An integer is a positive or negative whole number. Examples of positive

integers are 1, 2, 3, and 4. Examples of negative integers are -1, -2, -3, and -4. The number 0 is also considered an integer even though it has neither a positive or negative value. In most programming languages, you can convert a number into an integer using the int function.

> Float: With CSS (Cascading Style Sheets), float is a property that is used to help

position elements on a web page. For example, on this page an image is displayed on the right-side of this block of text. An image may be floated by using the img element with the CSS property float, as shown in the HTML/CSS code below.

> Floating point: a floating-point or float is a variable type that is used to store floating-

point number values. A floating-point number is one where the position of the decimal point can "float" rather than being in a fixed position within a number. Examples of floating-point numbers are 1.23, 87.425, and 9039454.

> Variable: is a named unit of data that is assigned a value. If the value is modified, the

name does not change. Variables are used with most programming languages and come in many forms, defined by the script or software programmer.

> Statement: In computer programming, a statement is a single line of code that is used

to perform a specific task.

> Assignment Statement: An assignment statement assigns value to a variable. The

value assigned may be constant, variable or an expression.

> Operator: In computer programming and at the command line, an operator is

an object that is capable of manipulating a value or operator. For example, in "

+ 2", the "1" and "2" are the operands and the plus symbol is the operator. Below

is a listing of common operators found in programming languages with

explanations and examples.

  • What are the operators in programming? (SYMBOLS)

> Operands: The operand '(3 + 5)' is an expression in itself, which contains an addition

operator, with the operands '3' and '5'.

> Expression: expression is any legal combination of symbols that represents a value.

Each programming language and application has its own rules for what is legal and illegal. For example, in the C language x+5 is an expression

> Modulus operator: %

> Concatenation: plus ( + )

> Mnemonic: =,<,>

  1. What are the use of the following codes?

> print (): print is a function that sends text, variables, or another object to the screen. If

you're more familiar with the programming language Scratch, print is equivalent to say.