Random Coin Toss

This program is a practice problem from a book.

The problem ask to write a program that randomizes a coin flip. In this situation 1 is for heads and 2 is for tails and it adds up how many times it landed on each side of coin.