\begin{Verbatim}[commandchars=\\\{\}]
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{x} \PYG{o}{=} \PYG{p}{[}\PYG{l+m+mi}{117}\PYG{p}{,} \PYG{o}{\PYGZhy{}}\PYG{l+m+mf}{267.14}\PYG{p}{]}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{n}{weight} \PYG{o}{=} \PYG{n}{kNN}\PYG{o}{.}\PYG{n}{calculate}\PYG{p}{(}\PYG{n}{model}\PYG{p}{,} \PYG{n}{x}\PYG{p}{)}
\PYG{g+gp}{\PYGZgt{}\PYGZgt{}\PYGZgt{} }\PYG{k}{print}\PYG{p}{(}\PYG{l+s+s2}{\PYGZdq{}class OP: weight =\PYGZdq{}}\PYG{p}{,} \PYG{n}{weight}\PYG{p}{[}\PYG{l+m+mi}{0}\PYG{p}{],} \PYG{l+s+s2}{\PYGZdq{}class NOP: weight =\PYGZdq{}}\PYG{p}{,} \PYG{n}{weight}\PYG{p}{[}\PYG{l+m+mi}{1}\PYG{p}{])}
\PYG{g+go}{class OP: weight = 2.0 class NOP: weight = 1.0}
\end{Verbatim}
