Python code:
import random
#initializing roller as an empty set
roller=set()
#looping for 5 times
for i in range(5):
#adding a random number in each roll to the set
roller
roller.add(random.randint(1,6))
#printing roller
print(roller)
Screenshot:
Output:
Get Answers For Free
Most questions answered within 1 hours.