Question #237618

Easy way is an online exam for new graduates of any discipline to find entry level jobs in their fields. the website generates the roll number of its registered students with the help of the students application number. the process includes a key K for generating an individual roll number. to generate the roll number , each digit in the application number is replaced by the kth digit that comes after it in the application number. the series of digits is considered in a cyclic fashion for the last k digits

Expert's answer

n = input('application number: ')
k = int(input('key: '))
new_n = ''
for i in range(len(n)):
	new_n += n[(i+k)%len(n)]
print(f'generated number: {new_n}')
LATEST TUTORIALS
APPROVED BY CLIENTS