Lädt...


🔧 Learning GO : 07 - Loops


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Hey! I am Currently learning Go Lang, and I am taking some basic Notes on my Notion and though I'd also just publish them here. They are not well thought out or well written but it's just me taking notes from time to time for my reference.

I am taking the Udemy Course by Maximilian Schwarzmüller,

Notes

Loops

  • In Go lang there is only for loop , other than this there are no loops

  • So, same as conditionals, loops does not have round brackets to wrap around the condition

    for i := 0; i < 200; i++ {}
  • they are directly declared with the := syntax for the variable declaration

Infinite for Loop

  • if we define a for loop without any condition then that loop can work as an infinite loop
    for {
        fmt.Println("===============")
        fmt.Println("What do you want to do?")
    }
  • one way to get out of the infinite loop in this case would be to use return statement but with that whole program will be stopped and anything added after that will not be executed

  • So to get out of the loops we can use the break statement, which will stop the loop and start executing next line of the loop

  • We can use continue statement to break out of any particular condition and get back to the main loops, this helps when working with conditions inside a loop, so that way we can stop any particular condition and start the loops again

  • continue statement will stop the current iteration of the loop and start again that loop

Switch statement

  • It is same as the other languages, nothing specific to GO in this
switch choice {
        case 1:
            fmt.Println("Your Balance is", accountBalance)
        case 2:
            fmt.Print("Your Deposit: ")
        case 3:
            fmt.Print("Withdrawal Amount:")
        default:
            fmt.Print("Goodbye!")
        }
...

🔧 🌟 Supervised Learning vs. Unsupervised Learning: A Complete Guide for Machine Learning Beginners


📈 17.08 Punkte
🔧 Programmierung

🐧 Is learning Linux the same as learning Bash? And if not, what does learning Linux consist of?


📈 17.08 Punkte
🐧 Linux Tipps

🔧 Reinforcement Learning from Scratch - Part 1 - Tabular Q Learning


📈 11.39 Punkte
🔧 Programmierung

📰 Amazon AWS Machine Learning Summit keynote kicks off with ‘few-shot learning’


📈 11.39 Punkte
📰 IT Nachrichten

📰 Sophos: Deep Learning statt Machine Learning


📈 11.39 Punkte
📰 IT Security Nachrichten

📰 heise-Angebot: Machine Learning mit Python – KI und Deep Learning in 5 Webinaren erklärt


📈 11.39 Punkte
📰 IT Nachrichten

🎥 Develop your own Machine Learning Model with Azure Machine Learning


📈 11.39 Punkte
🎥 Video | Youtube

📰 Human-Learn: Rule-Based Learning as an Alternative to Machine Learning


📈 11.39 Punkte
🔧 AI Nachrichten

🎥 Transfer Learning with indico - Ep. 27 Part 1 (Deep Learning SIMPLIFIED)


📈 11.39 Punkte
🎥 Künstliche Intelligenz Videos

🔧 Understanding AI, Machine Learning, Deep Learning, and Generative AI


📈 11.39 Punkte
🔧 Programmierung

📰 heise-Angebot: Machine Learning mit Python – KI und Deep Learning in 5 Webinaren erklärt


📈 11.39 Punkte
📰 IT Nachrichten

📰 Top Ten Python Libraries for Machine Learning and Deep Learning in 2024


📈 11.39 Punkte
🔧 AI Nachrichten

📰 Intuitive physics learning in a deep-learning model inspired by developmental psychology


📈 11.39 Punkte
🔧 AI Nachrichten

📰 heise-Angebot: Machine Learning mit Python – KI und Deep Learning in 5 Webinaren erklärt


📈 11.39 Punkte
📰 IT Nachrichten

📰 The Proof of Learning in Machine Learning/AI


📈 11.39 Punkte
🔧 AI Nachrichten

🎥 Reinforcement Learning - Ep. 30 (Deep Learning SIMPLIFIED)


📈 11.39 Punkte
🎥 Künstliche Intelligenz Videos

🔧 Understanding AI, Machine Learning, Deep Learning, and Generative AI


📈 11.39 Punkte
🔧 Programmierung

🎥 What is Machine Learning? What is Deep Learning? What Is the Difference Between Them?


📈 11.39 Punkte
🎥 Künstliche Intelligenz Videos

matomo