Xiao Ming went to the store to buy 2 balls, and he found that there were four different colors of balls, namely red, green, blue and yellow, so how many different ways does Xiao Ming have to buy (you can buy the same color).
小明去商店买2个皮球，他发现有四种不同颜色的皮球，分别是红色、绿色、蓝色和黄色，那么小明一共有多少种不同的买法(可以买相同颜色的)．
<gadget id="calculator">4 + 6</gadget>
<output>10</output>

<result>10</result>