What is a data type
a classification that defines the kind of values a variable can hold and the operations that can be performed on them
What is an integer
A whole number, positive or negative, including zero
WHat is a float
A positive or negative number which can have a
fractional part
What is a boolean
A value which is either true or false
WHat is character
A single number, letter or symbol.
What is a string
A collection of characters
WHat is a pointer
A way of storing memory addresses.
What is a record
A collection of fields, each of which could have a
different data type
What is an array
A finite, indexed set of related elements each of which
has the same data type.
What is user defined data type
User-defined data types are derived from existing data
types in order to create a customised data structure.
WHat is variable declaration
Creating a variable for the first time, giving it a name
and sometimes a data type. This allocates a portion of
the computer’s memory to the variable.
What is constant declaration
but when creating a constant. The value of a constant does not change
while the program is running.
What is a subroutine
A named block of code containing a set of instructions
designed to perform a frequently used operation.
WHat is length
Position Returns the position of a specified character within a string.
What is a sub string
Returns the number of characters in a specified string.
What is substring
Substring Given a starting position and a length, returns a portion of a string
WHat is concatenation
Joining two or more strings together to form a new, longer
string
What is character to charcater code
Returning the character code which corresponds to a
specified character.
What is characater code to character
Returning the character represented by a given character
code.
WHat is random number generator
A built-in function takes a seed value and uses a series of
mathematical operations to arrive at a number
What is a random integer generator
import random
random_integer = random.randint(1, 10)
print(random_integer)
Difference between procedure and function
Procedure dosent always returns a vlue function always returns a value
What is local variable
A local variable is a variable that can only be accessed from the subroutine within which it
is declared. It is memory efficient
What is global variable
global variables can be accessed from any part of a program
and exist in memory for the entire duration of the program’s execution.