Write a python program to generate student enrolment number to a student participating in a marathon. The enrolment number should be any random three digit number prefixed with "MRFIT". A sample enrolment number can be MRFIT307.
Answers
Answered by
2
from random import shuffle
def enrollment_no_gen():
nums = [str(n) for n in range(10)]
shuffle(nums)
return f"MRFIT{''.join(nums[:3])}"
sample_ids = [enrollment_no_gen() for _ in range(5)]
print("\n".join(sample_ids))
Similar questions