Maybe someone can help me with this. I've been working with python for less than a week, and it's my first programming language. I'm looking to figure out some basic things in python for an algorithm I wrote in a pseudo-code.
I'd like to know how I can take an array or list of numbers in the form of [[(x,y) (x',y') (x'',y'')], [(x''',y''')...]...] for any variables x and y and do operations on them. Specifically, I'd like to count how many occurrences a specific y occurs in the list (but not x which may also be the same number) i.e. how many times does the number 1 appear as as a y coordinate. Also, can I add a number to only the y coordinates? say I wanted to add the number 2 to any y equal to 3 to get 5?
I'd also like to be able to assign a series of numbers to the x coordinates, like a Fibonacci sequence... i.e. when x is 0=1, x' is 1=1, x'' is 2=2 x''' is 3=3, x'''' is 4=5, x''''' is 5=8, x'''''' is 6=13, etc.
or prime number sequence x=2, x'=3, x''=5 x'''=7, x''''=11, etc.
I have a feeling this stuff is pretty basic, but I'm having difficulty finding how to operate on coordinates in arrays since there are so many topics to sift through on so many different websites.
Also, how can I multiply the values of an entire numeric array with each other?
I might have more questions, but this seems to be it for now..
TIA,
mark