Edwin wants to create a three-slot machine in Go. To do this, he has created the SlotMachine struct and has written some code within the main() function so users of the slot machine can enter the betAmount.
Now Edwin needs to create two methods to make the slot machine work:
Play() — It should use a for loop to iterate over the s.Slots array and assign a random int number to each element of the slice using the rand.Intn() function.
CheckWin() — It should check if all three elements of the s.Slots array are equal and return the message: "Jackpot!". Otherwise it should return the message "You lost!".
math/rand package to generate random numbers for the slot machine output. However, don't be scared! You don't need to know how the math/rand package works to solve this problem. Your only objective is to write the additional required code to finish the implementation of the Play() and CheckWin() methods.