Switch case in golang and online playground

  Рет қаралды 26,328

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер: 28
@smaranh
@smaranh 3 жыл бұрын
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.
@priyeshranjan5235
@priyeshranjan5235 8 ай бұрын
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!") } }
@sohamkadam5018
@sohamkadam5018 5 ай бұрын
Thanks for sharing
@SUMITKUMARSHAW-km4fz
@SUMITKUMARSHAW-km4fz 4 ай бұрын
Thanks for sharing
@HarishSivaraman
@HarishSivaraman 4 ай бұрын
thanks for sharing
@FFGAMING-dr4dh
@FFGAMING-dr4dh 3 ай бұрын
thanks for info
@suryanshgarg3537
@suryanshgarg3537 2 ай бұрын
great
@ayushgautam6740
@ayushgautam6740 11 ай бұрын
Amazing Video. 🔥🔥
@fantsy3274
@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
@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.
@okeyshourovroy2769
@okeyshourovroy2769 3 жыл бұрын
First. And loving this series. A small request sir. Please come with a series with tensorflowjs 😀
@malaimama
@malaimama 3 ай бұрын
Amazing Video
@deepak_hp
@deepak_hp 3 жыл бұрын
can any please let me know why "break" is not used!?
@Hengul
@Hengul 3 жыл бұрын
Sir please add this Go series videos to a New playlist. That will be helpful.
@pranav_at_yt
@pranav_at_yt 3 жыл бұрын
Plz make a video on open ai codex
@finesttelugusongs2198
@finesttelugusongs2198 2 жыл бұрын
hi, one doubt i didn't get [ rand.Seed(time.Now().UnixNano()) ] whats happening in this line. will someone explain to me? Thank you
@nithiln7347
@nithiln7347 2 жыл бұрын
That is explained in this episode kzbin.info/www/bejne/r4HIio1mhtqmprc
@ronix-
@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
@SeedArt-f9b
@SeedArt-f9b 9 ай бұрын
oh@@ronix-
@vimalrijal8717
@vimalrijal8717 3 жыл бұрын
Nice
@MuhammedMuhammed-of5bd
@MuhammedMuhammed-of5bd 4 ай бұрын
thankyou sir
@khizrshaikh9902
@khizrshaikh9902 3 жыл бұрын
First I want Heart
@mrrishiraj88
@mrrishiraj88 3 жыл бұрын
🙏👍
Loop break continue and goto in golang
12:20
Hitesh Choudhary
Рет қаралды 27 М.
Don't Make this Golang Beginner Mistake!
8:57
Anthony GG
Рет қаралды 26 М.
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
How to treat Acne💉
00:31
ISSEI / いっせい
Рет қаралды 83 МЛН
Working with files in golang
12:40
Hitesh Choudhary
Рет қаралды 42 М.
Handling web request in golang
12:12
Hitesh Choudhary
Рет қаралды 44 М.
Go Pointers: When & How To Use Them Efficiently
14:09
Anthony GG
Рет қаралды 88 М.
Handling routes and testing routes in golang
20:25
Hitesh Choudhary
Рет қаралды 18 М.
A Practical Guide to Pointers in Go
10:05
TomDoesTech
Рет қаралды 4,4 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 24 М.
3 Golang Tips For Beginners I Wish I Knew Sooner
13:18
Anthony GG
Рет қаралды 49 М.
Advanced Golang: Goroutines & Channels
17:31
Tiago
Рет қаралды 8 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 82 М.