Update practice.py

added if, randoms, and convert to int