Categories: Lesson Notes

SS3 Second Term Computer Studies Lesson Note – BASIC Programming III (One-dimensional array)

The content is just an excerpt from the complete note for SS3 Second Term Computer Studies Lesson Note – BASIC Programming III (One-dimensional array). Check below to download the complete DOCUMENT

WEEK 3                                                        

TOPIC:          BASIC Programming III (One-dimensional array)

CONTENTS

  • Defining one-dimensional array
  • Operations on Array
  • Review of the (i) FOR-NEXT Statement, WHILE_END Statement etc

Sub-topic 1

What is an Array?

An array is a group of data items given the same name for processing. Students’ scores in some subjects, when listed or arranged under a name, constitute an array.  OR

An array is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier. Also arrangement of items of computerized data in tabular form for easy reference and identification is regarded as an array.

Defining one-dimensional array

An array whose values or items are arranged in only one direction is referred to as one-dimensional array. It is also called a linear list. E.g.  [2, 4, 3, 6, 7, 10, 12], [Ade, Ngozi, Zainab, Bello]

Numeric array: contain a set of numbers. The set is given a single name and each number in the array is called an element of the array.

Dimension Statement (DIM): this specifies the maximum values for any variable subscripted, and allocates storage accordingly.  The default is 10.  OR specifies the name of any array as well as the number of elements in the array. E.g.

10 DIM T(40)                                                 Array T has a maximum of 40 elements

15 DIM XI(23), X2(34)                                              Array X1 has a maximum of 23 elements and array X2

Has a maximum of 34 elements

30 DIM SCORE (400)                                                Array SCORE has a maximum of 400 elements

Suppose we have 400 scores listed for 400 students in a test. The set of scores make up an array. Each score is an element of the array.

To gain full access to the note: DOWNLOAD FILE

Sunday

Share
Published by
Sunday

Recent Posts

List of Universities Offering Veterinary Medicine in Nigeria

Veterinary medicine is the branch of medicine that deals with the prevention, diagnosis, and treatment…

3 months ago

List of Universities Offering Anthropology in Nigeria

Anthropology is the scientific study of human beings and their cultures. It encompasses a wide…

3 months ago

List of Universities Offering Sociology in Nigeria

Sociology is the scientific study of human society, culture, and behavior. It examines the social…

3 months ago

List of Universities Offering Social Work in Nigeria

Social Work is a profession dedicated to helping individuals, families, and communities to cope with…

3 months ago

List of Universities Offering Religious Studies in Nigeria

Religious studies is an academic discipline that explores the beliefs, practices, and history of various…

3 months ago

List of Universities Offering Public Administration in Nigeria

Public administration is the field of study and practice that focuses on the organization and…

3 months ago