Time-dependent Density-Functional-Theory (TDDFT) method is used to calculate the geometry and the absorption spectra of pyrrole (P) - acrylamide (A) oligomers in UV-Vis range. The effects of chain length and the position of the acrylamide on the absorption maxima and the intensity are investigated. There are strong deviations from planarity of pyrrole oligomers upon introducing acrylamide. It is observed that the model copolymers obtained by incorporation of an acrylamide monomer into pyrrole oligomers display blue shifts in the maxima. These shifts are strongly dependent on the position of acrylamide in the chain. Theoretical calculations are used to understand the structure of electrochemically prepared copolymer.