import random as rand #imports library random #sets library alias to rand size = int(input("Enter dice size:")) #Asks for dice faces print("You rolled a ",rand.randint(1,size)) #Prints result of roll using randint #from the random library