7. Let a set of three real numbers be represented both as $\left\{a, \frac{b}{a}, 1\right\}$ and as $\left\{a^{2}, a+b, 0\right\}$, then the value of $a^{2002}+b^{2003}$ is $\qquad$.
7. 1 .
$$
\left\{\begin{array} { l } 
{ a + \frac { b } { a } + 1 = a ^ { 2 } + ( a + b ) + 0 } \\
{ a \cdot \frac { b } { a } \cdot 1 = a ^ { 2 } \cdot ( a + b ) \cdot 0 , }
\end{array} \text { thus } \left\{\begin{array}{l}
a=-1 \text { (discard } 1) \\
b=0,
\end{array} \text { hence } a^{2002}+b^{2003}=1\right.\right. \text {. }
$$