Thanks for clarifying the fixed value in Go Playground regarding the seed value. I did run into that and did not understand why that happened.
@priyeshranjan52358 ай бұрын
Quick Update!! after GO 1.20 we do not need rand.seed() is deprecated we can use directly rand.Intn() func main() { fmt.Println("Switch and case in golang") diceNumber := rand.Intn(6) +1 fmt.Println("Value of dice is ", diceNumber) switch diceNumber { case 1: fmt.Println("Dice value is 1 and now you can open") case 2: fmt.Println("You can move 2 spot") case 3: fmt.Println("You can move 3 spot") fallthrough case 4: fmt.Println("You can move 4 spot") fallthrough case 5: fmt.Println("You can move 5 spot") case 6: fmt.Println("You can move 6 spot and roll dice again") default: fmt.Println("What was that!") } }
@sohamkadam50185 ай бұрын
Thanks for sharing
@SUMITKUMARSHAW-km4fz4 ай бұрын
Thanks for sharing
@HarishSivaraman4 ай бұрын
thanks for sharing
@FFGAMING-dr4dh3 ай бұрын
thanks for info
@suryanshgarg35372 ай бұрын
great
@ayushgautam674011 ай бұрын
Amazing Video. 🔥🔥
@fantsy3274 Жыл бұрын
Thanks for clarifying the fixed value in Go Playground regarding the seed value. But Sir in my case if we are not using the seed then it will work into the playground
@SakshamKarnawat Жыл бұрын
That's because the math/rand functions got updated. There's no need to use the seed now, either in playground or in own system IDE. It gives a random value in all the cases now, without the use of seed.
@okeyshourovroy27693 жыл бұрын
First. And loving this series. A small request sir. Please come with a series with tensorflowjs 😀
@malaimama3 ай бұрын
Amazing Video
@deepak_hp3 жыл бұрын
can any please let me know why "break" is not used!?
@Hengul3 жыл бұрын
Sir please add this Go series videos to a New playlist. That will be helpful.
@pranav_at_yt3 жыл бұрын
Plz make a video on open ai codex
@finesttelugusongs21982 жыл бұрын
hi, one doubt i didn't get [ rand.Seed(time.Now().UnixNano()) ] whats happening in this line. will someone explain to me? Thank you
@nithiln73472 жыл бұрын
That is explained in this episode kzbin.info/www/bejne/r4HIio1mhtqmprc
@ronix-9 ай бұрын
it's because in the new version of Go, rand does not need to be seeded, it will automatically seed with a random value while execution of the program