Posting code solutions is frowned upon. In this case it doesn't answer the OP's question ... because the OP did not ask a question!

Instead you might have pointed out (rather than repeated) the oddities in the OP's code: the strange naming conventions and indenting and the declared (or assigned) variables that were never used.

But by far the biggest help for the OP would come by leading him or her to actually ask a question. It is by describing things (our intentions, our attempts, their results) that we gradually begin to obtain a clue. Expressing things helps to obtain the best help from others but, almost magically, expressing things helps to clarify our own thoughts.

I don't know about you, but I find the process of "obtaining a clue" about some technology I'm not used to, rather hard work. The problem with code handouts is that they provide a deceptively compelling way out: they address the momentary problem of some code or other that doesn't "work", but they do nothing to foster the mental attitude that is capable of framing and solving a problem.