an alternate repetitive sequence is to be generated. Using If else how can I iterate even term to be -1 and odd to be 1