Python Code for predict next number from the sample of sequence

Job ID: 32719738

Budget: ₹37,500 – ₹75,000 INR

you have to create a python code that can predict and print the next number in a series of pseudo-random numbers.
you have to set the range of numbers from 0 to 27.
Below are the sample -
Sample 1 : [18,5,13,17,19,16,16,17,12,10,8,8,14]
predicted next number: 15
Sample 2 : [17,8,14,4,13,20,11]
predicted next number: 7
Sample 3 : [10,26,24,19,10,12,11,17,17,14,13,7,10,4,20,24,24,14,7,15,10,14]
predicted next number: 6