2D Array. (1 Viewer)

Kn1ght_M4r3

Member
Joined
Mar 3, 2003
Messages
332
Location
D o w n l o a d C o m p l e t e .....
Hey im just revising some stuff and i remember last week my teacher said when reading an array its the Y,X Co-ordinates u read??? I questioned him thinking it was the (X,Y). My excel book has (x,y) whereas my Carole Wilson has (Y,X) who is right? im lost :confused:

Excel Page 35
" In a 2d array, a data item is indexed by its horizontal position(row or x as we know in maths) and its vertical (column or y as we know in maths) position.

Page 59 Carole Wilson.

IN the 2-d array the notation for data item 22 would be shown as (0,2) where 0 is the index of the row and 2 is the index of the column.

[table looks like this in the carole wilson book]
TWO DIMENSIONS TABLE

6 65 22 56 12
33 97 45 29 11
32 4 31 67 38

i would of though data item 22 would be (2,0) assuming we start our index at 0. I argued with my teacher :pain: but bleh they said look at the book should of brang my excel to show. hehehe
Im sure i did it as (x,y) in my previous exams.
 

Kn1ght_M4r3

Member
Joined
Mar 3, 2003
Messages
332
Location
D o w n l o a d C o m p l e t e .....
Damn. I knew i should of continued arguing with my teacher. now i loook like a stooge :mad1: Lol. Well at least theres one person so far whos on my side ehhehe. Thanx olivia for confirming that.
pfft "maths and SDD are different" quote from what he said to meeh. welpz in the exam if he marks me wrong ill have to whoP out me excel book. :D

Anyone else think its the other way round??
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
there is ambiguity when asking questions such as this in an hsc exam.
so: they usually give an example of a coordinate in the question. like, they will say: if (2,3) = whatever, and (2,4) = whatever, give value for (x,y).
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
think of dictionaries/collections: the key is always the first value (ie: x) then the value(s) are y,z so on...
so the going downwards - the x value is the first one (ie the rows are the first value)
like - referring to dictWhatver(4,"dog") would be "dog" in the 4th 'row'.
so i would agree with caroline wilsons reference there, but as i said, they will have to give an example if they ask a question on that.
(i have seen it asked going both ways.)
 

del

Member
Joined
Jul 8, 2002
Messages
412
Gender
Undisclosed
HSC
N/A
foster is correct with them giving an example if they ask you
 

Kn1ght_M4r3

Member
Joined
Mar 3, 2003
Messages
332
Location
D o w n l o a d C o m p l e t e .....
okay kwelz thanx guys. because i was just seeing different examples and different working out. well in some of the books it doesn't say anything just says what location is 22 in or something. and if its in the carole wilson book its y,x but if its excel x,y.
but thanx alot.
 

JRasnier

Member
Joined
Apr 24, 2003
Messages
416
in Carole Wilson's Book??? u sure???
because we use Carole Wilson's book, heck i had her for teacher half of year 11, but i never remember having a 2d array, as y,x, instead of the way its meant to be x,y :spam: i learnt from that book and i always knew it was x,y anywayz, doesnt matter, BLAH BLAH BLAH useless post....:sniper:
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top