
Tech Tutorials Hub
711 subscribers
About Tech Tutorials Hub
Tech Tutorials Hub: Your go-to resource for mastering tech skills. Explore expert-guided tutorials, stay updated on the latest tech trends! Every member should Support by Subscribing: https://youtube.com/@TechtutorialsOfficial Download our app: https://play.google.com/store/apps/details?id=tech.tutorials3 Threads: https://www.threads.net/@_tech_tutorials Visit Website: Https://www.techtutorialshub.com
Similar Channels
Swipe to see more
Posts

Most programmers, if else, if else, if else, instead of just switching to the matching case π Instead of let day = 3; if (day === 1) { console.log("Monday"); } else if (day === 2) { console.log("Tuesday"); } else if (day === 3) { console.log("Wednesday"); } else { console.log("Other day"); } Use this let day = 3; switch(day) { case 1: console.log("Monday"); break; case 2: console.log("Tuesday"); break; case 3: console.log("Wednesday"); break; default: console.log("Other day"); } In Python use this value = 3 match value: case 1: print("One") case 2: print("Two") case 3: print("Three") case _: print("Other") Python 3.10+


β οΈ Common Syntax Errors (Mistakes in Writing Code) Mistake Error Youβll See Missing quotes SyntaxError: invalid syntax Typing Print instead of print NameError: name 'Print' is not defined Forgetting brackets SyntaxError: unexpected EOF

π Rules of Python (VERY IMPORTANT) β Do: Use lowercase for commands: print, not Print Use quotes for text: "Hello" or 'Hello' Use round brackets () for function calls β Don't: Forget quotes around text: print(Hello) β Use capital letters randomly: Print("Hi") β Miss a bracket: print("Hi" β

https://youtu.be/sZ6_wlPWE4E?si=qCDgNcwSddMJydXf

Checkout and subscribe Everyone π₯°π https://youtube.com/@techtutorialsofficial?si=Su_5fQFMBHIQ3Xe6
