@@syschinesubbie Yeah it's mostly an extremely basic video. This is not a quick "cheat sheet". I knew 90% of the video's contents already by staring at a single python file for 5 minutes instead. But it's not an awful video to play in the background while coding, so I did that... Edit: I just finished the video. It taught me about 1 or 2 new things. And it taught me how to setup Python in VSCode and how to do line by line debugging, and a few very useful VSCode keyboard shortcuts. So this is a good video for learning VSCode. Pretty awful video for learning Python as an experienced programmer (it's a slow beginner-style video). The video didn't even go into the things I was hoping to learn about, such as the weird docstring-annotations that Python uses for functions. Meh.
Great lesson! that last fizzbuzz for anyone intrested in a more robust solution like stringbuilder in java (I couldn't find a stringbuilder in python) Here it is: def fizz_buzz(input) -> str: result = "" if (input % 3 == 0): result = "fizz" if (input % 5 == 0): result += "buzz" if (not result): result = str(input) return result The last part that says not result (Because we know a "" is false so if it is empty (as we initiated it) then we can put a number in that emptiness.
Your 1hr 48 min course almost took 12 hrs for me to understand (because I am a beginner and tried to do hands-on practice as you were teaching in the video). Thank you for mentioning everything little thing in detail. ☺️
If it's still not working it must be because the terminal is not in the same folder as your app.py file...your present open folder in the terminal is the last one in the breadcrumb(C:\Users\(etc etc)\(present folder) . Use cd (folder path) to open the folder that the file is present in.
If you want to get rid of the [running] and [done] messages in the output, do this. Go to settings (ctrl + , ). Search [running]. Scroll about halfway down to “Code-runner: Show Execution Message” and deselect the box below it. To have your output clear every time, go to settings, lookup output, deselect “Code-runner: Clear Previous Output” After doing both of those, when I run the code, it looks the same on my terminal as in his.
It is a nice introduction to Python, still, I was hoping for a more advanced level as the name of the video implies. Love the course nonetheless! Thank you Mosh!
Highly recommended! This is a great crash course on Python for people with a little programming knowledge. It covers the first two chapters of his eleven chapter course. His class covers seven and a half hours of content beyond what you see here. Also, first time students get a pretty hefty discount!
I'm a low-level engineer. this is how I did it: #if x is divizible by 3, return fizz, by 5 - buzz, by 3 and 5 - fizbuzz, by neither - x. def fizz_buzz(x): out=['fizzbuzz','buzz','fizz',x] idx = int(x % 3 > 0) + 2 * int(x % 5 > 0) return out[idx] #but thanks for the tutorial, i learned python from you Mosh :-) fizz_buzz(501) 'fizz' fizz_buzz(330) 'fizzbuzz' fizz_buzz(17) 17
I am a first semester information technology student. I am loving this course. I did some html back in high school, but I plan on spending 2 hours a day, 6 days a week on this video. I am so glad people like you are willing to help people like me. I am so excited for what I really hope to be a brighter future for me. I'm not sure if I will get far enough by may; but I would like to learn enough to make a simple jeopardy comptia 1001 & 1002 study game. I have already made a cool alarm clock python code that plays funny sounds for every break at school. So far I am also glad that you are simplifying it for people like me to understand. I am someone who needed someone willing to break things down and "hold a hand through it" if you know what I mean.
@@programmingwithmosh lol thanks for link. That is the one I thought i was commenting on. I was watching it on tv via ps4 as I followed along on my laptop. I can't comment well on ps4, so i grabbed phone and must have clicked wrong 1 to comment on. But I am following the 6 hour video for now. Ty tho
Let me tell you, Sir, that this is the RIGHT way to teach a programming language. & the fact that you took into consideration that this video is oriented towards programmers is just elegant! I know more than 30 languages & this is my first time with Python, but with the help of this video, I believe I now have a perfect base to advance! Many regards!
Your table of contents literally saved me from going insane. The amount of times I typed the number 0 thinking I was in the VS Code window to instead reset the video had me SOOOOOO thankful you thought about having the table. Thanks to you, I remain sane for another day!
Damn it's really amazing how free courses on youtube like this are available. Programming is a very valuable skill, so it's nice to see tutorials like this available for no cost
Hey Mosh, great stuff. I have completed your JavaScript and all of your C# courses, and I think I know more about these topics than some people who should know more than me at this point (experienced devs). A great mix of practical and academic approach to teaching this stuff. Thank you.
Hey Mosh, I have already mastered React by studying your React Course and i am excited for Python course it looks awesome... Thanks for such great Tutorials and please please keep making such type of video and i will take it all..... By the i realize that you look like an Hollywood Start called "Stanley Tucci" !... once again thanks for Tutorials...
str[0:3] is actually not that simple. It might be simple for a python programmer but for someone coming from another island, it's actually harder to read. I never wrote a line in C# but I can understand str.substring(0, 3); just by seeing it in the code, because it is descriptive. Same with js, str.substr(0, 3); is shorter but still describing what it does. str[0:3] doesn't explain anything. You need to know what [ ] means and you need to know what : means. Is it creating an array from index 0 to index 3? Is it assigning int 3 to index 0? Or even filling random numbers from 0-3 into str? It could be anything. It is not clean it is not simple and it is not easy to read. It's quite an anti-pattern for a language that's supposed to be easy to understand. Don't get me wrong, I have used python quite a few times but just because something is shorter it doesn't mean it's better to read and understand.
Regarding the ast chapter, I would argue that this is the simplest and neatest implementation: def fizzbuzz(input): result = "" result += "fizz" if (input % 3 == 0) else "" result += "buzz" if (input % 5 == 0) else "" return result if result else input Anyway, thanks for this great introduction video!
When debugging someone else's code str.Substring(0, 3) is more verbose and much easier to understand than str[0:3] . The simplicity is nice when writing or creating but becomes difficult when maintaining. The same can be said about Perl. Dense code is hard to maintain.
since weeks I have been searched for an online tutorial and I am happy that I found you man, your explanation is practical and short enough to get everything. khaste nabashid.
Just began with Python and I'm enjoying every bit of it. Its syntax is super easy to follow, which makes it a perfect choice for those new to coding. What's more, Python is such a flexible language, opening paths to numerous areas.
Thanks for the tutorial. Here is my takeaway: "python = tcl - some_rich_programming_constructs" Here is the tcl mindset solution to closing problem. More elegant, wouldn't you say. def fizz_buzz(input): if not input % 3 and not input % 5: return "fizz_buzz" if not input % 3: return "fizz" if not input % 5: return "buzz" return input or def fizz_buzz(input): if input % 3 and input % 5: return input if input % 3: return "buzz" if input % 5: return "fizz" return "fizz_buzz"
I really appreciate you go through what settings you have in VS Code initially. I hate when I get into a beginner tutorial and the instructor immediately dive into coding and I have to manually attempt breakdown their settings myself to follow along easier
Got to say, my FizzBuzz was also neat. def fizz_buzz(input): out = "" if input % 3 == 0: out += "Fizz" if input % 5 == 0: out += "Buzz" if out == "": return input return out print(fizz_buzz(30))
Finally a course for devs. Much appreciated! Even it being basic. Just signed up to receive the early announcement of the avdanced course. But, please, don't let us down. Useful and real world stuff will always worth the investment and will always bring new customers.
Awesome dude! Been following along with Vim, and I found because you explained each thing so well, it was more effective for me to take a lot of notes on what was being taught and then create a whole program out of all of them afterwards. I learned a lot here coming from a background of almost exclusively C-style languages (in terms of syntax) and only a few variations (Assembly language being one of them). I feel like my life has been changed, it's so easy to get stuff up and running in Python! I'm definitely gonna be buying the course sometime soon.
wow Assembly! Bless your heart! learning that was such a nightmare for me but I'm glad i did. thus I'm really glad to be learning Python with these videos. Technical explanations are great
Im starting with programming and choose python as my first language. Those conditionals(if else) inside variable blow my mind. I did saw a lot of beginners video and some online classes. No one told me that. Thanks!
Thank you Mosh, especially for your hard work trying to teach us. I think you are the best tutor I've ever been taught. I hope and ask you to fill out your RUclips channel with a full crash Django course. Please do this for your students !!!
Write an applet that initially displays the word “Hello” in the center of a window. The word should follow the mouse cursor when it moved inside the window.
It's not that lists are mutable, there's a difference between x = x + 1 and x.append() to show that the id didn't change A better comparison for x = 1, x = x + 1 would be: x = [1,2,3] and then x = [2,3,4] the id of course would change because it is a new list. when you append to an existing list, you don't replace its head, so the id stays the same
Mosh, great tutorials. Just watched the section on Stings. One example not shown is the ability to grab values within a string using a single or double delineator. For example, we have a string mySTR = "one, two, three, four". Now using a single delineator, I want to get the value of the text between the first and second delineator. In a library I used (Called FUNCky) for the Clipper compiler (not sure if you recall that language and library) I'd use StrExtract(mySTR, ",", 2). This would return the string between the first comma and second comma. And if you had string (~One~, ~Two~, ~Three~, ~Four~) you could use two characters to separate the data you're extracting while ignoring the commas StrExtract(mySTR, "~~", 2). The second method would ignore the commas in the string, and just look for pairs of your searching delineators...and they could be any thing, even different characters like "~#". So I'm sure I could write the function to do this, but curious if Python has this built-in, or if you know of a library which contains string functions (and other functional functions). Actually, in my old programming days, we had developers who wrote practical functions, written in C for speed, that we'd be able to access in our code. We'd just incorporate the function library. I'm new to Python (but not not programming) and would love your input on my example above, and if you have advice on libraries for Python. Thank you. -Dave-
In general a "better and cleaner" way does not necessary remove lines of code. For FizzBuzz problem I think a better and cleaner way would be: if input % 3 == 0 result = Fizz if input % 5 result = Buzz return result
I need to learn Python soon as part of work, I have Java background ... was in a bit fear knowing nothing in Python.. Then I found your videos including this; I am sure , I can become a decent Python programmer too soon.. : ) you made it so simple .. Your videos are giving great confidence !!! Thanks a ton!!
30+ years a programmer here. I'm interested in Python and hope to get into it enough to feel comfortable after dabbling with it before. After 20 years of doing Java for my day job I've gone off it - it's a mess with annotations, auto-wiring 'magic' in frameworks, neat but complex streams/lambdas etc., it's not enjoyable at all. I can't see me doing Python for a living any time soon but I'd like to enjoy programming again!
Forex and binary options isn't as easy as it seems and there are lots of obstacles in it. But with the help of Mr Dagobert Decker, all risk is minimize to it's lowest form ....
Many thanks to Sir Dagobert Decker for making me what i am today with his great strategy, I have made great profits using his strategy ,,, visit dagobertdecker112 @gmail. com to be part of this great opportunity
This s a great Tutorial! I also have a suggestion for the exercise: Isn't it nicer to replace the first line with (if input % 15 == 0:) which is shorter?? Best wishes from Germany!
Programming with Mosh I watched it all, and I love it. Picked up a few new tricks too. Definitely worth it!! Thanks for the great work. Two nights ago, I stayed up to watch your JSON AJAX tutorial. You are a really good teacher.
Great Start Mosh, I love the idea of python for programmers - I don't want to wast my time learning things that i already know (like a beginner). I am a C# Programmer and BI Analyst with 6 Years Experience and I am moving to python for Data Science (AI, ML, etc..). Any Plans to Make a ML Cource using python ?
I can't wait to see the videos for ML and AI. I am actually enrolled for many classes on Udemy before I stumbled on Mosh free tutorials on RUclips. I immediately went to his site to subscribe for the monthly program after seeing the quality of his videos and the way he explain concepts shows that he's not just an experienced programmer but also knows his onions very well. I will recommend him any day to anyone who wants to truly understand programming. More power to your elbow sir!
hi bro i would like to know more about ML with python . did you get any link to learn ML . if u have please share the details . musthafaabins@gmail.com
#MicroNG ruclips.net/p/PLTXhDXS96cPUH7tTM2iuGUcLKow6zN6AC Learn python with MicroNG _DO LIKE❤ SUBSCRIBE😎 AND SHARE_ 😬 ``` FOR MORE eLearning tutorials```
I'm running this on Windows, and when doing VSCode on Windows 10, don't use python app.py, just make sure you use the input() at the end of your script (hacky way of getting the cmd to pause for a minute to see the program), and in the terminal, make sure you're at the directory path your app.py is in, then type ".\app.py" to launch the program. The way he described it didn't seem to work, though that's because Windows doesn't run on shell like Mac or Linux.
Quick Tip: The Table of contents in description is VERY usefull, too bad youtube minifies descriptions these days in favour of comments... In my opinion 0:29 to 01:32 is actually interesting as a crash course.. The rest.. meh.. Don´t let this guy (or anybody) put you down about your programming habits. We are all learning constantly, if we are doing it right.. Keep an open mind. Look up the imposter syndrome. It´s real, you are not alone! Yes, some standards are useful, but don´t adopt a practice unless you can see the logic or have made the mistake :) That´s the difference between dogma and common sense. We really should stop (as a species) trying to teach by shaming people into best practices. The end never justifies the means. This is mankind´s big lesson for the coming century, be among the first to adopt that (or don´t :)
I was just starting to think about searching for a python tutorial and out of nowhere i got the newsletter about this course and this is not the first time u pop up at the right time Mosh looking forward for the complete course !
Programming with Mosh i watched the entire video its amazing especially because you dont go through all the boring stuff of explaining what a variable is and all the beginner stuff honestly the repetitiveness of the basics is what got me bored and stopped me from learning python but after i watched this i kinda got more interested in going deeper with python
Got the fizz_buzz thing correct first try without looking back in the video, never been so happy in my life :D EDIT: This isn't my first programming lang probably why I knew
Thanks! Awesome way to explain the root theories of how things are linked together (Editors and IDEs, or what you really mean from mutable vs immutable) No one else does this, its been very helpful. Thanks!
What about this solution to the FuzzBuzz thing? This is how I solved it. Please consider that I'm learning Python and this is actually the first video I watch about it. def fizz_buzz(input): stri="" if int(input / 5) == input / 5: stri = "Fizz" if int(input / 3) == input / 3: stri += "Buzz" if stri == "": stri = input return stri print(fizz_buzz(15))
Very nice introduction. I like the way you immediately show the way to use it in an IDE, reducing the steepness of the learning curve. (You know: Not only learning a new language, but at the same time learning an IDE, debugger, etc.) PS: I like VSCode better and better. (Bye bye Sublime.)
Don't be such critics. This video is for programmers who know a different programming language and want to learn or jump into Python world. So consider this too.
I m having 2 years of experience in asp net mvc and i m thinking to move to python. Honestly speaking you're my THE BEST udemy instructor i have ever seen. The way you teach is awesome and the MAIN thing with the core details is that you explain every little thing in which probably can be asked in an interview too ! Thankyou for providing such a high quality and valuable content ! May Allah Bless You More :)
Yes you're right. Hey Mosh ! forgot ask first ! which software you use to make Animations ? ! i'm absolutely in love with those animations !! would you please tell me about that animation software ? !
If you come from C++ or Java, put the video at 2x and check the table of contents and skip to the things you want to see to get an understanding for the semantics, the content isn't really challenging at all. Personally, I think objects should've been part of the specification.
My FizzBuzz: def fizz_buzz(input): result = "" if input % 3 == 0: result += "Fizz" if input % 5 == 0: result += "Buzz" if not result: result = input return result print(fizz_buzz(3))
Exactly what I was thinking. The example in the video is horrible coding, because it does four modulo operations (they are not fast). Yours is a much more appropriate method.
@@programmingwithmosh php, js, sql, go and no really good C and Java. And I'm learninig asp.net with ur course and python w/MIT course now... in one time (oh).
I made the FizzBuzz so much harder than it had to be :D def fizz_buzz(input): remaining = input % 3 if remaining == 0: remaining = input % 5 if remaining == 0: print("FizzBuzz") else: print("Fizz") elif remaining == 2: print("Buzz") else: print(input)
You are great just completed your beginner course and just came for this for learning more some few more key concepts like type annotation and mutable and immutable
43:22 - That's not an accurate way to describe this, but speaking in general language terms... course is a class (or object) as you said earlier, than the id(course) is a pointer index to the class, and id(course[0]) is a pointer index to the first character of the string that is allocated on the heap.
I never understood the whole thing around Fizzbuzz, its hard to believe 99% of programers (it's what they say) have dificulty with it, i mean, i guess its mostly about how you code it and not if you can code it or not This was my function based on what i've learned from this video (im actually a web developer so it was mostly a syntax thing coming from php/javascript, you can see that i love the elvis operators / ternary operators) def fizz_buzz(num): fizz = 'Fizz' if num % 3 == 0 else '' buzz = 'Buzz' if num % 5 == 0 else '' if fizz and buzz: return f'{fizz} {buzz}' elif fizz or buzz: return fizz or buzz else: return num I'd actually do a different test when hiring someone for front end, they have to create a basic calculator with html and javascript (with buttons and stuff of course) and if they are going to work in the back end, the calculations have to be done via ajax.
Programming with Mosh I know the basics of python and c# and why I am watching this course is to see what else I can learn which I did find somethings like the arguments with functions and I am only grade 6 just so you know. I got the interest of coding when my dad showed me it
For anyone who just wants know how to code Python, and already knows all the background stuff or doesn't care: go to 30:00
thank you!
Wish I would’ve found this about a half hour ago lol
@@popecosh307 me too
not all heroes wear capes
Thank You
Python is mind blowing after working on C++ & Java for many years !!! Too Simple & too easy ❤️❤️
Too slow.
Python crash course for developers
also
"If you're not familiar with variables, don't worry.."
@@syschinesubbie Yeah it's mostly an extremely basic video. This is not a quick "cheat sheet". I knew 90% of the video's contents already by staring at a single python file for 5 minutes instead. But it's not an awful video to play in the background while coding, so I did that...
Edit: I just finished the video. It taught me about 1 or 2 new things. And it taught me how to setup Python in VSCode and how to do line by line debugging, and a few very useful VSCode keyboard shortcuts. So this is a good video for learning VSCode. Pretty awful video for learning Python as an experienced programmer (it's a slow beginner-style video). The video didn't even go into the things I was hoping to learn about, such as the weird docstring-annotations that Python uses for functions. Meh.
i assume he meant variable creation with Python, not variables in general lmao
Wow tough crowd
What are those variables you speak of
You have a point, but he shows a lot of interesting stuff too, especially concerning using Python in VSCode.
Great lesson! that last fizzbuzz for anyone intrested in a more robust solution like stringbuilder in java (I couldn't find a stringbuilder in python) Here it is:
def fizz_buzz(input) -> str:
result = ""
if (input % 3 == 0):
result = "fizz"
if (input % 5 == 0):
result += "buzz"
if (not result):
result = str(input)
return result
The last part that says not result (Because we know a "" is false so if it is empty (as we initiated it) then we can put a number in that emptiness.
Your 1hr 48 min course almost took 12 hrs for me to understand (because I am a beginner and tried to do hands-on practice as you were teaching in the video).
Thank you for mentioning everything little thing in detail.
☺️
Same here
@@chiragkumarchavda8546 Yeah me too
Basic Language Constructs: First 1:19
Functions : 1:20 - 1:24
Functions Optional Args : 1:24 - 1:27
Dictionaries : 1:27 - 1:29
Variable Scope : 1:29 - 1:33
Debugging : 1:33 - 1:36
Shortcuts Win VSCode : 1:36 - 1:39
Shortcuts Mac VSCode : 1:39 - 1:41
fizz_buzz : 1:41 - 1:48
edit: in windows with newer versions type py app.py not python app.py (took me a sec so if someone is looking in comments for why it complained)
thank you so much.. I was struggling for good 20 minutes.
this still doesnt do anything for me...
@@xorgfx-y4l py app.py
works for me :)
thank you!!!!
If it's still not working it must be because the terminal is not in the same folder as your app.py file...your present open folder in the terminal is the last one in the breadcrumb(C:\Users\(etc etc)\(present folder) . Use cd (folder path) to open the folder that the file is present in.
If you want to get rid of the [running] and [done] messages in the output, do this. Go to settings (ctrl + , ). Search [running]. Scroll about halfway down to “Code-runner: Show Execution Message” and deselect the box below it.
To have your output clear every time, go to settings, lookup output, deselect “Code-runner: Clear Previous Output”
After doing both of those, when I run the code, it looks the same on my terminal as in his.
It is a nice introduction to Python, still, I was hoping for a more advanced level as the name of the video implies.
Love the course nonetheless!
Thank you Mosh!
Highly recommended! This is a great crash course on Python for people with a little programming knowledge. It covers the first two chapters of his eleven chapter course. His class covers seven and a half hours of content beyond what you see here. Also, first time students get a pretty hefty discount!
I'm a low-level engineer. this is how I did it:
#if x is divizible by 3, return fizz, by 5 - buzz, by 3 and 5 - fizbuzz, by neither - x.
def fizz_buzz(x):
out=['fizzbuzz','buzz','fizz',x]
idx = int(x % 3 > 0) + 2 * int(x % 5 > 0)
return out[idx]
#but thanks for the tutorial, i learned python from you Mosh :-)
fizz_buzz(501)
'fizz'
fizz_buzz(330)
'fizzbuzz'
fizz_buzz(17)
17
> for developers
> explains what an IDE is
thought exactly the same
noo
yeah... :(
answers my question
😂😂😂
I am a first semester information technology student. I am loving this course. I did some html back in high school, but I plan on spending 2 hours a day, 6 days a week on this video. I am so glad people like you are willing to help people like me. I am so excited for what I really hope to be a brighter future for me. I'm not sure if I will get far enough by may; but I would like to learn enough to make a simple jeopardy comptia 1001 & 1002 study game. I have already made a cool alarm clock python code that plays funny sounds for every break at school. So far I am also glad that you are simplifying it for people like me to understand. I am someone who needed someone willing to break things down and "hold a hand through it" if you know what I mean.
@@programmingwithmosh lol thanks for link. That is the one I thought i was commenting on. I was watching it on tv via ps4 as I followed along on my laptop. I can't comment well on ps4, so i grabbed phone and must have clicked wrong 1 to comment on. But I am following the 6 hour video for now. Ty tho
Let me tell you, Sir, that this is the RIGHT way to teach a programming language.
& the fact that you took into consideration that this video is oriented towards programmers is just elegant!
I know more than 30 languages & this is my first time with Python, but with the help of this video, I believe I now have a perfect base to advance!
Many regards!
Those 300 dislikes are from those computer science teachers who saw this and were jealous of your teaching skills
i miss dislikes
Your table of contents literally saved me from going insane. The amount of times I typed the number 0 thinking I was in the VS Code window to instead reset the video had me SOOOOOO thankful you thought about having the table. Thanks to you, I remain sane for another day!
Damn it's really amazing how free courses on youtube like this are available. Programming is a very valuable skill, so it's nice to see tutorials like this available for no cost
Thank you for quick tutorial!
h a m p s t e r
Set the video to 2x and learned Python in less than an hour, thanks Mosh! :)
Hey Mosh, great stuff. I have completed your JavaScript and all of your C# courses, and I think I know more about these topics than some people who should know more than me at this point (experienced devs). A great mix of practical and academic approach to teaching this stuff. Thank you.
🕹🕹🕹🖲🕹🕹🕹🕹🕹🖲🖲🖲🖲🖲🖲🖲🖲📷🕹🎥🎥🎥🎥📽📽📽📽📽📽💿💿💿💾💿💿💿💿💿🖨🖨🖨🖨🖨🖨🖨🖨🖥🖥🖥🖥🖥⌨️⌨️⌨️⌨️⌨️💻💻💻💻📲📲📲📱📱📱⌚⌚⌚⌚⌚⌚⌚🖱🖱🖱🖲🖲🖲🖲🖲🕹🕹🕹🕹🗜🗜💽💽💽💽💾💾📀📀📼📼📼📷📷📷📸📸📸📹📹📹🎥🎥🎥📽😀😀😃😄😁😁😁😆😆😅😅😂🤣☺😊😇🙂🙃😉😍🥰😘😗😚🐶🐱🐭🐹🐰🦊🐻🐼🐨🐯🦁🐮🐷🐽🐵🙈🙉🙊🐒🐔🍏🍎🍐🍊🍋🍌🍉🍇🍓🍈🍒🍑🥭🍍🥝🥑🍅🍆🥦🥬⚽🏀🏈⚾🥎🎾🏐🏉🥏🎱🪀🏓🏸🥅🏒🏒🏑🏑🥍🏏⛳🪁🏹🚗🚕🚙🚌🚎🏎🚓🚑🚒🚐🚚🚛🚜🦽🦼🛴🚲🛵🏍🛺🚨❤🧡💛💚💙💜🖤🤍🤎💔❣️💕💞✝️💗💖💘💝💟☮️✝️🏳🏴🏴☠️🏁🚩🏳🌈🇦🇽🇦🇱🇦🇸🇦🇴🇦🇮🇦🇶🇦🇬🇦🇲🇦🇼🇧🇪
As always, everything is clear and nicely structured into a short video.
Thank you Mosh, and good luck!
Hey Mosh, I have already mastered React by studying your React Course and i am excited for Python course it looks awesome...
Thanks for such great Tutorials and please please keep making such type of video and i will take it all.....
By the i realize that you look like an Hollywood Start called "Stanley Tucci" !...
once again thanks for Tutorials...
str[0:3] is actually not that simple. It might be simple for a python programmer but for someone coming from another island, it's actually harder to read.
I never wrote a line in C# but I can understand str.substring(0, 3); just by seeing it in the code, because it is descriptive. Same with js, str.substr(0, 3); is shorter but still describing what it does. str[0:3] doesn't explain anything. You need to know what [ ] means and you need to know what : means. Is it creating an array from index 0 to index 3? Is it assigning int 3 to index 0? Or even filling random numbers from 0-3 into str? It could be anything.
It is not clean it is not simple and it is not easy to read. It's quite an anti-pattern for a language that's supposed to be easy to understand.
Don't get me wrong, I have used python quite a few times but just because something is shorter it doesn't mean it's better to read and understand.
thank you!
def fizz_buzz(input):
message = "Fizz" if not input % 3 else ""
message += "Buzz" if not input % 5 else ""
return message if message else input
Regarding the ast chapter, I would argue that this is the simplest and neatest implementation:
def fizzbuzz(input):
result = ""
result += "fizz" if (input % 3 == 0) else ""
result += "buzz" if (input % 5 == 0) else ""
return result if result else input
Anyway, thanks for this great introduction video!
def FizzBuzz(input):
result = "Fizz" if (input % 3 == 0) else ""
result += "Buzz" if (input % 5 == 0) else ""
return result if result else input
@@iamraj12345 nice, I didn't see that! :)
When debugging someone else's code str.Substring(0, 3) is more verbose and much easier to understand than str[0:3] . The simplicity is nice when writing or creating but becomes difficult when maintaining. The same can be said about Perl. Dense code is hard to maintain.
since weeks I have been searched for an online tutorial and I am happy that I found you man, your explanation is practical and short enough to get everything. khaste nabashid.
Just began with Python and I'm enjoying every bit of it. Its syntax is super easy to follow, which makes it a perfect choice for those new to coding. What's more, Python is such a flexible language, opening paths to numerous areas.
Thanks for the tutorial. Here is my takeaway:
"python = tcl - some_rich_programming_constructs"
Here is the tcl mindset solution to closing problem. More elegant, wouldn't you say.
def fizz_buzz(input):
if not input % 3 and not input % 5:
return "fizz_buzz"
if not input % 3:
return "fizz"
if not input % 5:
return "buzz"
return input
or
def fizz_buzz(input):
if input % 3 and input % 5:
return input
if input % 3:
return "buzz"
if input % 5:
return "fizz"
return "fizz_buzz"
I really appreciate you go through what settings you have in VS Code initially. I hate when I get into a beginner tutorial and the instructor immediately dive into coding and I have to manually attempt breakdown their settings myself to follow along easier
@@programmingwithmosh I think a balance needs to be involved and even then can't please everyone but I found yours pretty good 😁
@@programmingwithmosh What theme are you using. I really like it but I'm struggling to find it.
Wowww.... Dedication level is visible in the description box... Wow... Good one.. going through it now.. i am sure it will be of great use.
Thank u
Got to say, my FizzBuzz was also neat.
def fizz_buzz(input):
out = ""
if input % 3 == 0:
out += "Fizz"
if input % 5 == 0:
out += "Buzz"
if out == "":
return input
return out
print(fizz_buzz(30))
Wow. You explain things so beautifully and simply. Thank you so much for this video. You have gained a new subscriber.
Finally a course for devs. Much appreciated! Even it being basic.
Just signed up to receive the early announcement of the avdanced course. But, please, don't let us down. Useful and real world stuff will always worth the investment and will always bring new customers.
Awesome dude! Been following along with Vim, and I found because you explained each thing so well, it was more effective for me to take a lot of notes on what was being taught and then create a whole program out of all of them afterwards. I learned a lot here coming from a background of almost exclusively C-style languages (in terms of syntax) and only a few variations (Assembly language being one of them). I feel like my life has been changed, it's so easy to get stuff up and running in Python!
I'm definitely gonna be buying the course sometime soon.
wow Assembly! Bless your heart! learning that was such a nightmare for me but I'm glad i did. thus I'm really glad to be learning Python with these videos. Technical explanations are great
Im starting with programming and choose python as my first language. Those conditionals(if else) inside variable blow my mind. I did saw a lot of beginners video and some online classes. No one told me that. Thanks!
49:37 , I'm leaving this here so that I would know where to start from next time I come.
Thank you Mosh, especially for your hard work trying to teach us. I think you are the best tutor I've ever been taught. I hope and ask you to fill out your RUclips channel with a full crash Django course. Please do this for your students !!!
def fizz_buzz(input):
str = ""
if input % 3 == 0:
str += "fizz"
if input % 5 == 0:
str += "Buzz"
if not str:
str = input
return str
Overall Awesome tutorial and it gave me new direction in python.. but ads really disturbed me when i was in flow of learning.
Write an applet that initially displays the word “Hello” in the center of a window. The word should follow the mouse cursor when it moved inside the window.
Mosh, you are one of the best teachers out there in being able to teach programming so easily 🎉⭐️⭐️⭐️⭐️⭐️
It's not that lists are mutable, there's a difference between x = x + 1 and x.append() to show that the id didn't change
A better comparison for x = 1, x = x + 1 would be:
x = [1,2,3] and then x = [2,3,4] the id of course would change because it is a new list. when you append to an existing list, you don't replace its head, so the id stays the same
Mosh, great tutorials. Just watched the section on Stings. One example not shown is the ability to grab values within a string using a single or double delineator. For example, we have a string mySTR = "one, two, three, four". Now using a single delineator, I want to get the value of the text between the first and second delineator. In a library I used (Called FUNCky) for the Clipper compiler (not sure if you recall that language and library) I'd use StrExtract(mySTR, ",", 2). This would return the string between the first comma and second comma. And if you had string (~One~, ~Two~, ~Three~, ~Four~) you could use two characters to separate the data you're extracting while ignoring the commas StrExtract(mySTR, "~~", 2). The second method would ignore the commas in the string, and just look for pairs of your searching delineators...and they could be any thing, even different characters like "~#". So I'm sure I could write the function to do this, but curious if Python has this built-in, or if you know of a library which contains string functions (and other functional functions). Actually, in my old programming days, we had developers who wrote practical functions, written in C for speed, that we'd be able to access in our code. We'd just incorporate the function library. I'm new to Python (but not not programming) and would love your input on my example above, and if you have advice on libraries for Python. Thank you. -Dave-
Mosh has a gift for teaching, excellent style and presentation. class Act:
your vids make coding looks so simple ....
love from india and keep it up
In general a "better and cleaner" way does not necessary remove lines of code.
For FizzBuzz problem I think a better and cleaner way would be:
if input % 3 == 0
result = Fizz
if input % 5
result = Buzz
return result
Mosh is the king! I bought his ReactJS course when it was on sale, no regrets!
That presentation is just top notch 👍. it would be nice if you upload some course completely for your youtube subscribers
Only 28 mins in and I'm already drowning in quality. Good job!
I need to learn Python soon as part of work, I have Java background ... was in a bit fear knowing nothing in Python..
Then I found your videos including this;
I am sure , I can become a decent Python programmer too soon.. : ) you made it so simple ..
Your videos are giving great confidence !!! Thanks a ton!!
Me: Hello yes I would like to brush up on Python please
Programming with Mosh: HERE ARE THE TOP 6 REASONS YOU SHOULD LOVE PYTHON
from a beginner (in python):
def fizzbuzz(n):
r = ""
if n % 3 == 0:
r = "Fizz"
if n % 5 == 0:
r += "Buzz"
return r if r else n
30+ years a programmer here. I'm interested in Python and hope to get into it enough to feel comfortable after dabbling with it before.
After 20 years of doing Java for my day job I've gone off it - it's a mess with annotations, auto-wiring 'magic' in frameworks, neat but complex streams/lambdas etc., it's not enjoyable at all.
I can't see me doing Python for a living any time soon but I'd like to enjoy programming again!
PERFECT , exactly what I wanted.
THANKS MAN.
This guy sat for an hour.Thank so much😇
This vid will surely help me in learning Python for my school A.I, ML and DL project.
Thnx Sir Mosh!!
i was obliged to watch this tutorial and explain everything to my father in a few hours
Forex and binary options isn't as easy as it seems and there are lots of obstacles in it. But with the help of Mr Dagobert Decker, all risk is minimize to it's lowest form ....
Many thanks to Sir Dagobert Decker for making me what i am today with his great strategy, I have made great profits using his strategy ,,, visit dagobertdecker112 @gmail. com to be part of this great opportunity
Mr Dagobert is willing to work with you and teach you his exact strategy. And you can make consistent winning from there
This s a great Tutorial! I also have a suggestion for the exercise:
Isn't it nicer to replace the first line with (if input % 15 == 0:) which is shorter??
Best wishes from Germany!
I already know how to program in python but here I am, watching this while fully captivated. You make learning and coding fun! Thanks.
Programming with Mosh I watched it all, and I love it. Picked up a few new tricks too. Definitely worth it!! Thanks for the great work. Two nights ago, I stayed up to watch your JSON AJAX tutorial. You are a really good teacher.
Programming with Mosh definitely!!! 👍🏽👍🏽
This was incredibly helpful, especially the VS code settings & shortcuts walkthrough, thanks!
Great Start Mosh, I love the idea of python for programmers - I don't want to wast my time learning things that i already know (like a beginner).
I am a C# Programmer and BI Analyst with 6 Years Experience and I am moving to python for Data Science (AI, ML, etc..).
Any Plans to Make a ML Cource using python ?
I can't wait to see the videos for ML and AI. I am actually enrolled for many classes on Udemy before I stumbled on Mosh free tutorials on RUclips. I immediately went to his site to subscribe for the monthly program after seeing the quality of his videos and the way he explain concepts shows that he's not just an experienced programmer but also knows his onions very well. I will recommend him any day to anyone who wants to truly understand programming. More power to your elbow sir!
@@abiodunanifowose7913 +1 AI/ML by mosh :-)
hi bro i would like to know more about ML with python . did you get any link to learn ML . if u have please share the details . musthafaabins@gmail.com
#MicroNG
ruclips.net/p/PLTXhDXS96cPUH7tTM2iuGUcLKow6zN6AC
Learn python with MicroNG
_DO LIKE❤ SUBSCRIBE😎 AND SHARE_ 😬
```
FOR MORE eLearning tutorials```
I'm running this on Windows, and when doing VSCode on Windows 10, don't use python app.py, just make sure you use the input() at the end of your script (hacky way of getting the cmd to pause for a minute to see the program), and in the terminal, make sure you're at the directory path your app.py is in, then type ".\app.py" to launch the program. The way he described it didn't seem to work, though that's because Windows doesn't run on shell like Mac or Linux.
I really enjoyed and very simple and clean explanation to get into python world of programming. Thank you mosh for this great effort.
My implementation of FizzBuzz:
def fizz_buzz(user_num):
fb_string = ""
if int(user_num) % 3 == 0:
fb_string = "Fizz"
if int(user_num) % 5 == 0:
fb_string += "Buzz"
else:
return user_num
return fb_string
print(fizz_buzz(3))
print(fizz_buzz(5))
print(fizz_buzz(15))
print(fizz_buzz(7))
def fizzbuzz(num: int):
return "FizzBuzz" if num % 3 == 0 and num % 5 == 0 else "Fizz" if num % 3 == 0 else "Buzz" if num % 5 == 0 else num
To enable Format on save on windows
Go to setting(VS Code: bottom left) and under USER SETTINGS save this code -> {"editor.formatOnSave": true}
I work with py and c# daily but look at me, glued to my screen. Awesome as always Mosh. Why aren't u at 1M subscribers yet?
Quick Tip: The Table of contents in description is VERY usefull, too bad youtube minifies descriptions these days in favour of comments... In my opinion 0:29 to 01:32 is actually interesting as a crash course.. The rest.. meh..
Don´t let this guy (or anybody) put you down about your programming habits. We are all learning constantly, if we are doing it right.. Keep an open mind. Look up the imposter syndrome. It´s real, you are not alone!
Yes, some standards are useful, but don´t adopt a practice unless you can see the logic or have made the mistake :)
That´s the difference between dogma and common sense.
We really should stop (as a species) trying to teach by shaming people into best practices. The end never justifies the means.
This is mankind´s big lesson for the coming century, be among the first to adopt that (or don´t :)
I was just starting to think about searching for a python tutorial and out of nowhere i got the newsletter about this course and this is not the first time u pop up at the right time Mosh looking forward for the complete course !
Programming with Mosh i watched the entire video its amazing especially because you dont go through all the boring stuff of explaining what a variable is and all the beginner stuff honestly the repetitiveness of the basics is what got me bored and stopped me from learning python but after i watched this i kinda got more interested in going deeper with python
Got the fizz_buzz thing correct first try without looking back in the video, never been so happy in my life :D
EDIT: This isn't my first programming lang probably why I knew
Thanks! Awesome way to explain the root theories of how things are linked together (Editors and IDEs, or what you really mean from mutable vs immutable) No one else does this, its been very helpful. Thanks!
What about this solution to the FuzzBuzz thing? This is how I solved it. Please consider that I'm learning Python and this is actually the first video I watch about it.
def fizz_buzz(input):
stri=""
if int(input / 5) == input / 5:
stri = "Fizz"
if int(input / 3) == input / 3:
stri += "Buzz"
if stri == "":
stri = input
return stri
print(fizz_buzz(15))
Very nice introduction.
I like the way you immediately show the way to use it in an IDE, reducing the steepness of the learning curve. (You know: Not only learning a new language, but at the same time learning an IDE, debugger, etc.)
PS: I like VSCode better and better. (Bye bye Sublime.)
this video is the best revision one can ever have in 1 hour ,Thank you so much :D
Don't be such critics. This video is for programmers who know a different programming language and want to learn or jump into Python world. So consider this too.
You're a great teacher. I really admire you.
VSCode, Kraken, and Glo Boards. That's my core dev env. Love it!
I'm at about 22 minutes in and dissapointed that you're still setting up the environment.
BEST THING is the TIMESTAMP you wrote !
I m having 2 years of experience in asp net mvc and i m thinking to move to python. Honestly speaking you're my THE BEST udemy instructor i have ever seen. The way you teach is awesome and the MAIN thing with the core details is that you explain every little thing in which probably can be asked in an interview too ! Thankyou for providing such a high quality and valuable content ! May Allah Bless You More :)
Yes you're right. Hey Mosh ! forgot ask first ! which software you use to make Animations ? ! i'm absolutely in love with those animations !! would you please tell me about that animation software ? !
If you come from C++ or Java, put the video at 2x and check the table of contents and skip to the things you want to see to get an understanding for the semantics, the content isn't really challenging at all. Personally, I think objects should've been part of the specification.
# My solution
def fizz_buzz(input):
str = ""
if not input % 3:
str += "Fizz"
if not input % 5:
str += "Buzz"
if str:
return str
return input
Ditto. I perused the comments just to see if someone had mentioned this yet!
@@JoeShapiro It seems that nobody yet :)
My FizzBuzz:
def fizz_buzz(input):
result = ""
if input % 3 == 0:
result += "Fizz"
if input % 5 == 0:
result += "Buzz"
if not result:
result = input
return result
print(fizz_buzz(3))
Exactly what I was thinking. The example in the video is horrible coding, because it does four modulo operations (they are not fast). Yours is a much more appropriate method.
You are so brilliant mosh sir you've created such an easy and interactive course hats off to you
I want every people can talk English like you. So available and beauty speech. :)
@@programmingwithmosh php, js, sql, go and no really good C and Java. And I'm learninig asp.net with ur course and python w/MIT course now... in one time (oh).
@@programmingwithmosh oh, thx, but I have bought :) aha, that's ok, I'm intrested and may be will get job with ASP... who know...
This was great! I have very little coding experience so this was very easy to understand. Now onto the 6 hour course :)
I made the FizzBuzz so much harder than it had to be :D
def fizz_buzz(input):
remaining = input % 3
if remaining == 0:
remaining = input % 5
if remaining == 0:
print("FizzBuzz")
else:
print("Fizz")
elif remaining == 2:
print("Buzz")
else:
print(input)
You are great just completed your beginner course and just came for this for learning more some few more key concepts like type annotation and mutable and immutable
I just finished the six hour one and honestly I prefer Pycharm more than vscode
43:22 - That's not an accurate way to describe this, but speaking in general language terms... course is a class (or object) as you said earlier, than the id(course) is a pointer index to the class, and id(course[0]) is a pointer index to the first character of the string that is allocated on the heap.
Settings (gear icon) > Playback Speed > 1.25
I never understood the whole thing around Fizzbuzz, its hard to believe 99% of programers (it's what they say) have dificulty with it, i mean, i guess its mostly about how you code it and not if you can code it or not
This was my function based on what i've learned from this video (im actually a web developer so it was mostly a syntax thing coming from php/javascript, you can see that i love the elvis operators / ternary operators)
def fizz_buzz(num):
fizz = 'Fizz' if num % 3 == 0 else ''
buzz = 'Buzz' if num % 5 == 0 else ''
if fizz and buzz:
return f'{fizz} {buzz}'
elif fizz or buzz:
return fizz or buzz
else:
return num
I'd actually do a different test when hiring someone for front end, they have to create a basic calculator with html and javascript (with buttons and stuff of course) and if they are going to work in the back end, the calculations have to be done via ajax.
res = ''
if not input % 3: res += 'Fizz'
if not input % 5: res += 'Buzz'
return res or input
Thanks Mosh, you are one of the best teachers in programming! ;-)
Thanks, Mosh your courses are amazing. It is like fun while learning how to code. Keep up the good work
What do you think @Mosh?
def fizz_buzz(a:int):
res = ""
if a % 3 == 0: res = "Fizz"
if a % 5 == 0: res += "Buzz"
return str(a) if not res else res
you are also a legend for showing me how to run python code because every tutorial I see is showing me incorrect things!
Programming with Mosh I know the basics of python and c# and why I am watching this course is to see what else I can learn which I did find somethings like the arguments with functions and I am only grade 6 just so you know. I got the interest of coding when my dad showed me it
01:06:55 Logical Operators