Specifications:
1. Write a function named generate_eight() to generate 8 unique lucky numbers:
\textbullet These 8 random numbers shall be integers between 10 and 99 (both inclusive)
without repeat.
\textbullet The function accepts no input argument and returns a list holding 8 unique random
integers.
2. Write a function main().
\textbullet Ask the user to enter a student ID.
\textbullet Extract the last two digits from the input student ID with the slicing technique.
\textbullet Start a loop to control multiple attempts:
\textbullet \textbullet Display a dotted line to separate each attempt. Make the line length be 50.
\textbullet \textbullet Display the last two digits of the student ID.
\textbullet \textbullet Call the generate_eight() function and assign it to a list variable.
\textbullet \textbullet Display the random number list.
\textbullet \textbullet Check if the student ID is in the list:
\textbullet \textbullet \textbullet If yes, print a message "Finally I am lucky with this number". End the
program.
\textbullet \textbullet \textbullet Otherwise, ask the user to try again. A new set of 8 unique lucky
numbers should be generated when the user types 'y' to this
question.
\textbullet End the program when a user inputs 'n'.
3. Users can generate random lucky numbers as many times as they want until a lucky
number is found a match.
4. Write proper comments for your code.
5. No need to handle invalid user inputs.
Sample output:
Enter your student ID: 12345678
Last two digits in my student ID: 78
Lucky numbers are: [44, 38, 81, 80, 28, 12, 66, 91]
Not lucky. Try again? [y or n]: y
Last two digits in my student ID: 78
Lucky numbers are: [59, 57, 63, 64, 85, 39, 84, 46]
Not lucky. Try again? [y or n]: y
Last two digits in my student ID: 78
Lucky numbers are: [86, 52, 62, 74, 16, 98, 34, 78]
Finally I am lucky with this number: 78
Process finished with exit code 0
** Note: the bold words are user inputs.