💡 Chapter 2 UPDATE: The latest versions of VS Code no longer support the auto-formatting I demonstrated. That said, I did the research, and if you want this formatting behavior, I show you how to get it back here: www.davegray.codes/posts/how-to-auto-format-unwanted-python-line-indents
I think Python class can be taught best in PyCharm, it's free just like VS Code, but it's OK, I can still use PyCharm for this course on my side. VS Code is not really an IDE, it's a text editor that trying to be everything and that is not good. I use IntelliJ for Java, PyCharm for Python, and VS Code for JS/TS.
I should have looked at the comments a while ago! smh About to try this now. I thought it was something I was doing wrong. I have been troubleshooting this for weeks lol
@dave Thanks man ,,how i wish i could find a better way to appreciate you....Yesterday i was in an interview and i managed to secure a position i'll be starting my new job as a junior frontend engineer 1st August 2023,,How i wish it could be posible for me to attach the job letter here ,this is all because of you, I've never stepped in any college,university or even college,,This journey started March this Year..Thanks And be blessed
@businessclass8185 sow a financial seed into Dave's life. Dave gives out so much good free training that others charge. Let's encourage him by sowing financial seeds when we get jobs
Thank you Dave! I compleated your HTML and CSS courses and they were fantastic! This Python course also looks great! Now we just need a Django course for web developing to wrap all theese courses together! :D Keep up the great work!
I am ditching Mosh for Gray. My new favorite UA-cam instructor who not only explains syntax thoroughly but also with live real projects and examples. This is the best Free Python course on the entire internet so far. Keep it coming. Everyone talks about React, hope to see the Angular series from you. Thanks.
Glad you escaped that Mosh guy HAHAHA. First time I saw the way he thought 5 years ago, I immediately knew I wouldn't learn as efficiently as I would've liked.
It’s 2:25pm, Tuesday, 1st/August/2023; and I’m beginning this great course. I took html and css and know I decided to take this course before I go to your JavaScript course. THANKS TEACHER DAVE GRAY. YOU’RE TEACHING SO WELL.
In case if anyone is wondering, "Menu" occupies 4 characters, and the rest of the available characters (20 - 4 = 16), are taken by the "=" character. You can count the "=" to confirm this.
i sorta have just been breezing past my college textbooks and not really retaining anything. Doing this walkthrough with you on a language I havent even learned yet was so refreshing. My school doesnt use VS code and decided to teach us Java and C. Thank you for making this tutorial introducing us to a popular language and code editor! This course was so nice though thank you for posting!
Thank you, Dave! I've just completed this course and will soon start Django from your channel. Your teachings have been invaluable. Wishing you a fantastic life ahead. Thank you again! 🙂
In chapter 16 Arcade code: Line 17: RETURN restarts the game. I used CONTINUE to fix my issue as it continues the loop. Day 18: 05:53:29 Lambdas and High Order Functions done.
I think this is one of the best Python tutorials that I come across - you covered everything important and dove deep into it - Appreciate it! - I would love if you could make a Django course with your hands on teaching style.
Amazing content. Thanks Just one tip for all the students, Use below code at the beginning of all lessons you're going to follow side by side. it will clear the output terminal everytime runs the programs, so you don't get to see the previous outputs again and again. import os os.system('clear') # Linux os.system('cls') # Windows
Thank you Dave! This is really a amazing course! You specified everything so distinctly, and there is basically no murmur or hesitation when you talk, so you definitely prepared all of those codes and sentences in advance. That's absolutely a hard and time-consuming work, thank you again for doing all this, we really benefit a lot from your work! And I will no doubt go back and support you once I get my job and salary, wait for me! Haha
01:30:58: rp.py was giving me an error and was only printing my choice. The problem was with sys.exit call: sys.exit("You must enter 1, 2 or 3.") When you use sys.exit(), it immediately terminates the program. This means that the code after the sys.exit() call won't be executed. So the correct order is: print("You must enter 1, 2 or 3.") sys.exit()
rock scissors paper game 1:21:58 1stpart 2:59:03 2nd part 3:29:39 3rd part 3:52:18 4th part 4:08:40 5th part 4:34:49 6th part 4:54:12 7th part 5:08:03 8th part new
I spent more than 9 hours just on chapter 1. Windows 10 with defender real-time turned on was preventing the correct install. Finally found how to disable real time and defender reinstalled and then it started working.
Thanks a ton Dave! I've looked at a lot of different beginner tutorials, but none of them were as easy to understand and clear as yours. The learning process for me was very fluid and easy. Keep it up! :D
In chapter 5(user input), you have used playerchoice and computerchoice(which are strings) in if else statements, this way the user never wins, you have to use player and computer in if else(instead of playerchoice and computerchoice) so they are taken as int and the game would work properly
Thanks for this! I learned fundamental python in 2018 but I haven't touched it since so I have to re-learn how everything is organized. It's maddening that so much of how it works has changed. No { } to close in functions, no semicolons, plain text rather than function names for operaters (i.e. elseif(outcome1, outcome2, var3 > var4); is replaced with outcome1 if var3 > var4 else outcome2. I can see how it's maybe more intuitive now for a new programmer but I always preferred how python was very straightforward about what was going on under the hood. Plus you don't even need to define the data type of your variables anymore, what is this place???
I suggest anyone who first see the whole video to review it many times, and see how Dave Gray is great! This will solve all your python programming skill issues.
Day 1: 00:00 - 43:10 - Starting off slowly, playing around with the line and print commands, and if/else statements. Dar 2: 43:10 - 1:20:12 - Big step from the previous chapters, didn't have much time today, but still learned a lot from chapter 4. Day 3: 1:20:12 - 2:13:45 - Getting the hang of the basics I think, watched another tut of a quiz game as well, some things are difficult to remember tho, but we keep trying. Day 4: 2:13:45 - 3:05:48 - Dicts & Loops, this helped a lot. Also completed two beginner Python modules on Microsoft Learn, still find Python confusing tho. Day 5: 3:05:48 - 3:37:55 - Not much time today, but now got notes about functions and recursions.
In the operators section if you describe and, or & not like the and or & not gates, It will be much easier to understand like True=1 False=0 and means multiplication and Or means addition, and Not is just the opposite. But I learnt alot from your courses .A lot of free knowledge. It is knowledge is useless when it isn't spread. Your knowledge is indeed useful .You are indeed a great teacher.
Man You are so didactic,wish I had found this course before, I've had some other good ones on UA-cam but you are by far more didactic than any other, thanks man
sir dave gray , you have great teaching skills and im learning at the age of 14, hope to be a python programer in some time . ive already watched an hour and watch ten , fifteen minutes a day and 10 minutes practice of what i watch .
Hi, in 2:55:02, in the loop/range example, when does the system go to the else statement and print "Glad It's over"? We've defined a range of numbers, right? so how/what causes the system go to the else statement?
Thanks Dave! At 55:00 when saving the data type in Multiple lines: When I Save the file to run it it auto corrects and removes the single quotes and backslashes and does not run. Suggestions?
Thanks very much Dave for your excellent content and continued encouragement. I have no idea what I am going to do with Python, but you make learning fun :) Have a good day all.
A minor question/comment on Chapter 16: Challenges... My understanding is that a parameter or variable in a parent function is available to all child functions. If we want to change that parameter or variable we have to add the line 'nonlocal [parameter name]' in the child function. If that is the case do we need to write 'nonlocal name' when we are not changing name, simply using it? This is what I noticed in the guess_number.py code.
If I would make a suggestion, it would be better if you had a clean install of everything, so that we can follow along. For example, I'm used to Eclipse environment, and it's my second time trying to learn to use Visual Studio, and you have already a project created, and I'm not sure how to have that LESSON01, I guess I'll have first to create a folder, or a project, but it would help if you would do that together.
Awesome course, but It's apparent that Python is your next language therefore you put parentheses where they don't need to be, 1. unpack tuples without parentheses --> one, two, *hey = (1, 2, 3, 4, 5) 2. IF without parentheses --> if num >= 9: return num + 1 These are just aesthetic little things that don't affect the performance of the code, but a pythonist will catch them 🧐😅😉 Thanks for this course and even more for Django 👌
good, but at 1:04:38, jumped right into functions and arguments (passing values), without actually going into what are functions first. Might not be too easy for a complete beginner.
on the lines str(RPS(player)).replace('RPS.', ''). etc and str(RPS(computer)).replace('RPS.', ''). etc, on lesson 10 i think, you could say: RPS(player).name and RPS(computer).name for short end you'd get the same result
so I guess, closure is when you are modifying a variable from the parent function but still want to have access to it because you want to use the nested function again and the nested function needs to have the original value of the variable that was set in the parent function. Because if we don't use closure the value of the variable in the parent function will permanently change
Hi Dave, At timestamp 00:24:07 Python doesn't correct the indentation of the string. I had already installed the extension package you suggested. I turned "auto save" ON, I also tried "python > formatting:" and it is in "auto / default" (there is no "auto 8".
Love the speed of the teaching. I’m coming from JS and this is perfect for determining if it’s about the same as what I already know or if I need to take notes on the differences. I’ll be looking into your other tutorials after I finish Python. Thanks for the generous lessons!
OMG - I found just getting started so complicated! Wouldn’t using something like Replit be easier for everyone to get up and running in just a few minutes? HNY Dave 🥳. Cheers, Michael 🇦🇺
I want to share another knowledge about the formatter: 1. Install autopep8 2. Make this as the default auto formatter. in your settings.json "[python]": { "editor.defaultFormatter": "ms-python.autopep8", "editor.formatOnSave": true, }, It works as of July 25 2024.
Hi, I have problems with import random. The first time we created the rock paper scissors game it worked, but thereafter none of the next games worked saying syntax error and random module not recognized. What can I do? Thanks
I had the same problem,but u can still fix the issue use black formatter extension instead and then go to setting in the json file put this lines of code { "workbench.colorTheme": "Default Dark Modern", "editor.codeActionsOnSave": {}, "editor.formatOnSave": true, "[python]": { "editor.formatOnSave": true, "editor.defaultFormatter": "ms-python.black-formatter", "editor.codeActionsOnSave": { "source.organizeImports": true } } }
@@quietcorner5989 tried this but not working. I have tried autopep8 & Black Formatting both but neither of these working. Not able to send import command at the top automatically after save nor formatting is working. Did it worked for you?
On your terminal screen on the far right, there is a column of square boxes with a '>' in them. My terminal has them, too. Is there a way to remove them and not inject them so that only the terminal is shown? Thanks.
Hey dave hope you are doing good ,my question in 3:24 (recursive function) why we had to use the return key word for the function to return the value 10 ,we already have the retun key word inside the if statement so it would return num+1 which is 10 and it ends the function immediatly and the final returned value which is 10 would be stored inside the variable mynewtotal so as soon as we print it we should get 10 in the terminal ,but it wasn't the case it was none instead of 10 I didn't get that part please if you could tell why we have to add a second return key word for the function (return add_one(total)!!!?
Ok, your link went to 3 mins 24 secs but you meant 3hrs, 24 mins. Oh, goodness. He used totally unnecessary brackets in the if condition, very unpythonic. Anyway, let's forgive him but jeez... Anyway, you ask, why the return? The only way to get something out of a function is to return. Otherwise it's trapped in it. This is called "local scope" and it's a very good thing. It means your variables in one function don't trigger in another or anything else outside that function. You can imagine in a big project this would become a nightmare. So, even to get something from your function back into your function needs a return. That's because the name of your function is outside the scope of the interior of your function. The indent is the key. Return is like "go up an indent", I've never thought about it that way before but yeah, it's basically true. So, your function returns a called function into the outer scope which is able to call the function again. Without it, it would look for a function within the scope of the function (a nested function) and not find one. You can have nested functions btw, but that's advanced.
@@davidmurphy563thank you ,I actually forgot about the issue 😅 I need to go back check again what was the issue because it’s been 1 month now and get to you back see your response if it makes sense ,thanks bro 😊
Hi Dave, thanks for the video, its really clear and concise, but I have a quick question, in lesson 12 at about 4 hrs 9 mins where you copy all the code and indent it forward, you use Shift and Tab key, please what else did you click, I'm finding it hard to align my code. Thanks.
HELP!! Stuck at the end of chapter 2! I cannot get autopep8 to work. I couldn't find it in settings in the same way as here, I added the extension and I have it set as default but it won't auto format, whether using ctrl+s or right-clicking and selecting 'format document'.
I'm at 5:20 and I got stuck because after installing the python extension and doing Ctrl+shift+P and pressing > Python Select Interpreter it gives me an error saying command 'python.setinterpreter' not found. I tried uninstalling reinstalling and restarting VSC but to no avail. even went into the user/.vscode/extensions area and there are no files for python in it either. Anyone know how to fix this?
Had the same issue, Uninstall and reinstall but make sure you check the two boxes (admin and path) and it will work also the new version you have to put Python -V for version
The formatting part, I did configure the "format on save", "format on save mode"=file, and the "python > formatting", but the control+s didn't fixed the extra spaces.
I uninstalled everything, cleaned up any older settings on "AppData\Roaming\Code" and still didn't work the of indentation, the rest of formatting works (no space between elements, for example.
I couldn't get the autosave function working on the current version of python (3.11.8) but after installing the autopep8 formatter it worked. You may also need to install some additional formatting 'tools'
The lessons are fantastic,but being a beginner to programming,I would suggest to make it easy to rewind the lessons with an option to forward and backward for a period of 10 seconds.It would do a lot of good to us who are not English speaking natives
6:50 my terminal looks different, from top I have "PS C:\Users\my name>" written with grey letter, I want to write under it and I don't know how, when I click enter the text from the upper line just repeats itself and I have: "PS C:\Users\my name> PS C:\Users\my name>" any help ?
The PS indicates you are using the PowerShell terminal. When you press enter as you described, it just goes down one line and gives you the same prompt. It is waiting for you to enter something.
@@DaveGrayTeachesCode 6:50 I have the same issue, on command prompt terminal i get the same prompt when pressing enter. I get the message "'py' is not recognized as an internal or external command, operable program or batch file." when trying to verify the python installation. What do I do?
On your terminal screen on the far right, there is a column of square boxes with a '>' in them. My terminal has them, too. Is there a way to remove them and not inject them so that only the terminal is shown? Thanks.
💡 Chapter 2 UPDATE: The latest versions of VS Code no longer support the auto-formatting I demonstrated. That said, I did the research, and if you want this formatting behavior, I show you how to get it back here: www.davegray.codes/posts/how-to-auto-format-unwanted-python-line-indents
was looking for solution. at last got it. Thanks Dave
@@satthiarasanthanikasalam4673
but technically it's not a good one because you will have to roll back to an older version of VS-code 😐
I think Python class can be taught best in PyCharm, it's free just like VS Code, but it's OK, I can still use PyCharm for this course on my side. VS Code is not really an IDE, it's a text editor that trying to be everything and that is not good. I use IntelliJ for Java, PyCharm for Python, and VS Code for JS/TS.
😊fz
I should have looked at the comments a while ago! smh About to try this now. I thought it was something I was doing wrong. I have been troubleshooting this for weeks lol
@dave Thanks man ,,how i wish i could find a better way to appreciate you....Yesterday i was in an interview and i managed to secure a position i'll be starting my new job as a junior frontend engineer 1st August 2023,,How i wish it could be posible for me to attach the job letter here ,this is all because of you, I've never stepped in any college,university or even college,,This journey started March this Year..Thanks And be blessed
Congratulations! 🎉 This is what I like to hear!
@businessclass8185 sow a financial seed into Dave's life. Dave gives out so much good free training that others charge. Let's encourage him by sowing financial seeds when we get jobs
Thanks for the motivation and congratulations 🎉
❤
By giving him a few hundred dollars for example, it's a good start 😊
Thank you Dave! I compleated your HTML and CSS courses and they were fantastic! This Python course also looks great! Now we just need a Django course for web developing to wrap all theese courses together! :D Keep up the great work!
I am ditching Mosh for Gray. My new favorite UA-cam instructor who not only explains syntax thoroughly but also with live real projects and examples. This is the best Free Python course on the entire internet so far. Keep it coming. Everyone talks about React, hope to see the Angular series from you. Thanks.
who is Gary?
Glad you escaped that Mosh guy HAHAHA. First time I saw the way he thought 5 years ago, I immediately knew I wouldn't learn as efficiently as I would've liked.
@@sophiek.6944 sorry it was a typo, I meant to say 'Gray'.
Dave, the Python course is exactly what I have been waiting for! Well done!
Appreciate you sharing this course. I.’m a 75 year old retired Software / Systems Engineer retired in 20014. However I’m an independent learner.
Glad I could help!
Best python course indeed. This guy explains every topic elaborately.
It’s 2:25pm, Tuesday, 1st/August/2023; and I’m beginning this great course. I took html and css and know I decided to take this course before I go to your JavaScript course.
THANKS TEACHER DAVE GRAY. YOU’RE TEACHING SO WELL.
did u finish?
@@Iinustechtips good question
In case if anyone is wondering, "Menu" occupies 4 characters, and the rest of the available characters (20 - 4 = 16), are taken by the "=" character. You can count the "=" to confirm this.
i sorta have just been breezing past my college textbooks and not really retaining anything. Doing this walkthrough with you on a language I havent even learned yet was so refreshing. My school doesnt use VS code and decided to teach us Java and C. Thank you for making this tutorial introducing us to a popular language and code editor! This course was so nice though thank you for posting!
Thanks Dave for sharing such a popular programming language for free. Million thanks Dave.
I have only just begun watching this, installing VS Code and so on. Your explanation is SO clear. Great work!
Thank you, Dave! I've just completed this course and will soon start Django from your channel. Your teachings have been invaluable. Wishing you a fantastic life ahead. Thank you again! 🙂
I am glad this channel showed up...
I already have Python and it's in POP OS on a mid range laptop...thanks
In chapter 16 Arcade code:
Line 17: RETURN restarts the game.
I used CONTINUE to fix my issue as it continues the loop.
Day 18: 05:53:29 Lambdas and High Order Functions done.
This Dave guy is one of the best course creators on youtube. No cap.
I think this is one of the best Python tutorials that I come across - you covered everything important and dove deep into it - Appreciate it! - I would love if you could make a Django course with your hands on teaching style.
Amazing content. Thanks
Just one tip for all the students, Use below code at the beginning of all lessons you're going to follow side by side. it will clear the output terminal everytime runs the programs, so you don't get to see the previous outputs again and again.
import os
os.system('clear') # Linux
os.system('cls') # Windows
Thank you Dave! This is really a amazing course! You specified everything so distinctly, and there is basically no murmur or hesitation when you talk, so you definitely prepared all of those codes and sentences in advance. That's absolutely a hard and time-consuming work, thank you again for doing all this, we really benefit a lot from your work! And I will no doubt go back and support you once I get my job and salary, wait for me! Haha
You're welcome! 🙏
This is a real deal, you blow my mind away. What an amazing demonstration we all have been waiting for. Thank you, Dave.
This 9 hour long course is superb. Thank you very much, Dave!!!!!!!!!!!!!!!💯
Literally the best teacher Ive ever had the honor to learn from. Thanks for sharing your knowledge for free with us all
Thanks!
Thank you for the support!
This is incredible, thank you so much for doing this for the community. You rock Dave!
Studied for 8 hours straight watching the video and learned a lot. Thank You .
01:30:58: rp.py was giving me an error and was only printing my choice. The problem was with sys.exit call: sys.exit("You must enter 1, 2 or 3.")
When you use sys.exit(), it immediately terminates the program. This means that the code after the sys.exit() call won't be executed.
So the correct order is:
print("You must enter 1, 2 or 3.")
sys.exit()
I finally understand the usage and meaning of "__name__ " after this tutorial! Thanks! ( timestamp around 4:50:00)
rock scissors paper game
1:21:58 1stpart
2:59:03 2nd part
3:29:39 3rd part
3:52:18 4th part
4:08:40 5th part
4:34:49 6th part
4:54:12 7th part
5:08:03 8th part
new
I spent more than 9 hours just on chapter 1. Windows 10 with defender real-time turned on was preventing the correct install. Finally found how to disable real time and defender reinstalled and then it started working.
I am 12 year old and I can understand python just because of you . Thanks sir💫
Now learn the bible or any other book. Youre religion is fake muhammad
you are one of the best programming lang teacher out in the youtube community keep up the good work so that we can all learn
Thanks a ton Dave! I've looked at a lot of different beginner tutorials, but none of them were as easy to understand and clear as yours. The learning process for me was very fluid and easy. Keep it up! :D
This course is excellent. After having followed along for seven hours, I have to thank you again for this wonderful instruction.
In chapter 5(user input),
you have used playerchoice and computerchoice(which are strings) in if else statements, this way the user never wins, you have to use player and computer in if else(instead of playerchoice and computerchoice) so they are taken as int and the game would work properly
Thanks for this! I learned fundamental python in 2018 but I haven't touched it since so I have to re-learn how everything is organized. It's maddening that so much of how it works has changed. No { } to close in functions, no semicolons, plain text rather than function names for operaters (i.e. elseif(outcome1, outcome2, var3 > var4); is replaced with outcome1 if var3 > var4 else outcome2. I can see how it's maybe more intuitive now for a new programmer but I always preferred how python was very straightforward about what was going on under the hood. Plus you don't even need to define the data type of your variables anymore, what is this place???
the details and explanation the software has helped to understand the program. you are a very good teacher! thank you.
Hi Dave, 24:50 I am using mac os and I have already installed python extension, but it does not provide debug function.
thank you for the well described tutorial, you have the right answers everytime a question pops up in my mind about the subject at hand
I suggest anyone who first see the whole video to review it many times, and see how Dave Gray is great!
This will solve all your python programming skill issues.
Day 1: 00:00 - 43:10 - Starting off slowly, playing around with the line and print commands, and if/else statements.
Dar 2: 43:10 - 1:20:12 - Big step from the previous chapters, didn't have much time today, but still learned a lot from chapter 4.
Day 3: 1:20:12 - 2:13:45 - Getting the hang of the basics I think, watched another tut of a quiz game as well, some things are difficult to remember tho, but we keep trying.
Day 4: 2:13:45 - 3:05:48 - Dicts & Loops, this helped a lot. Also completed two beginner Python modules on Microsoft Learn, still find Python confusing tho.
Day 5: 3:05:48 - 3:37:55 - Not much time today, but now got notes about functions and recursions.
goat
@@YpressStudiosI shall return one day
@@YpressStudios Exactly!
Thank you Dave!
Your wonderful teacher!
yes you have courses in udema i would like to buy them a token of thanks you explain very well
In the operators section if you describe and, or & not like the and or & not gates, It will be much easier to understand like True=1
False=0
and means multiplication and Or means addition, and Not is just the opposite.
But I learnt alot from your courses .A lot of free knowledge. It is knowledge is useless when it isn't spread. Your knowledge is indeed useful .You are indeed a great teacher.
The best python tutorial for the beginner as well as intermediate learners. Thank you so much. You rock.
Once again, I feel nothing but love. Thank you for the wonderful content, Mr. Dave.
Knowledge is power.
Finally completed it , it took about 2 weeks 🎉🎉😢 thank u so much dave, u made this a lot simple for me and i've found a new found interest in python.
Man You are so didactic,wish I had found this course before, I've had some other good ones on UA-cam but you are by far more didactic than any other, thanks man
I have been waiting for the python course on one video and here it is thanks Dave
5:36:00 VSCode1.91.1 (mac) does not reformat lambda functions (at least for me)
sir dave gray , you have great teaching skills and im learning at the age of 14, hope to be a python programer in some time . ive already watched an hour and watch ten , fifteen minutes a day and 10 minutes practice of what i watch .
You can do it!
@@DaveGrayTeachesCode thanks!!!!!!
@@DaveGrayTeachesCode thanks, by the way , where are you from and what is your age sir?????
You are awesome, i learned nodejs from you, now i am here again to learn python. I cant appreciate you enough for the good work you do. ❤
Dank uw wel meneer 👏👏👏 deeply appreciated🙌🌺🌺🌺
Hi, in 2:55:02, in the loop/range example, when does the system go to the else statement and print "Glad It's over"? We've defined a range of numbers, right? so how/what causes the system go to the else statement?
Thanks Dave! At 55:00 when saving the data type in Multiple lines: When I Save the file to run it it auto corrects and removes the single quotes and backslashes and does not run. Suggestions?
Thanks very much Dave for your excellent content and continued encouragement. I have no idea what I am going to do with Python, but you make learning fun :)
Have a good day all.
A minor question/comment on Chapter 16: Challenges...
My understanding is that a parameter or variable in a parent function is available to all child functions. If we want to change that parameter or variable we have to add the line 'nonlocal [parameter name]' in the child function.
If that is the case do we need to write 'nonlocal name' when we are not changing name, simply using it?
This is what I noticed in the guess_number.py code.
you sir are a life saver, Its hard for me to sit and listen to videos but you are easy to understand and had me hooked right away thank you :) !
Great to hear!
If I would make a suggestion, it would be better if you had a clean install of everything, so that we can follow along.
For example, I'm used to Eclipse environment, and it's my second time trying to learn to use Visual Studio, and you have already a project created, and I'm not sure how to have that LESSON01, I guess I'll have first to create a folder, or a project, but it would help if you would do that together.
Awesome course, but It's apparent that Python is your next language therefore you put parentheses where they don't need to be,
1. unpack tuples without parentheses --> one, two, *hey = (1, 2, 3, 4, 5)
2. IF without parentheses --> if num >= 9: return num + 1
These are just aesthetic little things that don't affect the performance of the code, but a pythonist will catch them 🧐😅😉
Thanks for this course and even more for Django 👌
El mejor profesor que he visto, eres un genio Dave y lo mejor de todo un profe carismatico. Thank you very much.
Thank you for the kind words!
Great teacher out here. Thanks...
This is a master piece, thank you Dave 💪
Great job here, I learned a lot from this.
thanx alot for compiling the tutorials. it helps alot.
During lesson 9, VSC told me to use "is instance()" instead of "type()" @3:12:00
good, but at 1:04:38, jumped right into functions and arguments (passing values), without actually going into what are functions first. Might not be too easy for a complete beginner.
hello sir
I am from Bangladesh, your videos are very helpful. A lot of love for you from Bangladesh.❤
on the lines str(RPS(player)).replace('RPS.', ''). etc and
str(RPS(computer)).replace('RPS.', ''). etc, on lesson 10 i think, you could say:
RPS(player).name and RPS(computer).name for short end you'd get the same result
24:25: Hi, Dave, the automatic indention does not work. I have already installed the python extension.
so I guess, closure is when you are modifying a variable from the parent function but still want to have access to it because you want to use the nested function again and the nested function needs to have the original value of the variable that was set in the parent function. Because if we don't use closure the value of the variable in the parent function will permanently change
hey can someone help me, at 13:05 , when i type "py hello.py" it says no such file or directory even though i saved it as .py and a python file
Hi Dave, At timestamp 00:24:07 Python doesn't correct the indentation of the string. I had already installed the extension package you suggested. I turned "auto save" ON, I also tried "python > formatting:" and it is in "auto / default" (there is no "auto 8".
There is a note about the formatting change in VS code in the description of the video.
Tried that, no luck@@DaveGrayTeachesCode
What a great tutorial, much appreciated👍👍👍
Love the speed of the teaching. I’m coming from JS and this is perfect for determining if it’s about the same as what I already know or if I need to take notes on the differences. I’ll be looking into your other tutorials after I finish Python. Thanks for the generous lessons!
OMG - I found just getting started so complicated! Wouldn’t using something like Replit be easier for everyone to get up and running in just a few minutes? HNY Dave 🥳. Cheers, Michael 🇦🇺
Better to learn something you will work with on the job than using something like Replit even though you could use it if you want to.
I want to share another knowledge about the formatter:
1. Install autopep8
2. Make this as the default auto formatter.
in your settings.json
"[python]": {
"editor.defaultFormatter": "ms-python.autopep8",
"editor.formatOnSave": true,
},
It works as of July 25 2024.
Thanks Dave, it was fantastic journey for the beginner :)
Starting my Journey to Python. New Beginning,
Hi, I have problems with import random. The first time we created the rock paper scissors game it worked, but thereafter none of the next games worked saying syntax error and random module not recognized. What can I do? Thanks
26:08 im not getting this option of python>formatting:provider can anyone resolve and if i save also the indentation error is not getting fixed
VS Code has updated and changed a few things. New directions: code.visualstudio.com/docs/python/formatting
I had the same problem,but u can still fix the issue use black formatter extension instead and then go to setting in the json file put this lines of code
{
"workbench.colorTheme": "Default Dark Modern",
"editor.codeActionsOnSave": {},
"editor.formatOnSave": true,
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}
}
@@quietcorner5989 {
"workbench.colorTheme": "Default Dark Modern",
"editor.codeActionsOnSave": {},
"editor.formatOnSave": true,
"[python]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "ms-python.autopep8",
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
}
}
@@quietcorner5989 tried this but not working. I have tried autopep8 & Black Formatting both but neither of these working. Not able to send import command at the top automatically after save nor formatting is working. Did it worked for you?
David please tell your students that source is not a cmd for the people using powershell terminal environment
i'm learning python for the first time, and im starting this course today. im excited to learn, thank you for making these materials available.
Did you complete learning python course?
how is the course?
On your terminal screen on the far right, there is a column of square boxes with a '>' in them. My terminal has them, too. Is there a way to remove them and not inject them so that only the terminal is shown? Thanks.
This tutorial should have been ranked at the leading position among the most Python courses on UA-cam.
Hey dave hope you are doing good ,my question in 3:24 (recursive function) why we had to use the return key word for the function to return the value 10 ,we already have the retun key word inside the if statement so it would return num+1 which is 10 and it ends the function immediatly and the final returned value which is 10 would be stored inside the variable mynewtotal so as soon as we print it we should get 10 in the terminal ,but it wasn't the case it was none instead of 10 I didn't get that part please if you could tell why we have to add a second return key word for the function (return add_one(total)!!!?
Ok, your link went to 3 mins 24 secs but you meant 3hrs, 24 mins. Oh, goodness. He used totally unnecessary brackets in the if condition, very unpythonic. Anyway, let's forgive him but jeez...
Anyway, you ask, why the return?
The only way to get something out of a function is to return. Otherwise it's trapped in it. This is called "local scope" and it's a very good thing. It means your variables in one function don't trigger in another or anything else outside that function. You can imagine in a big project this would become a nightmare. So, even to get something from your function back into your function needs a return. That's because the name of your function is outside the scope of the interior of your function. The indent is the key. Return is like "go up an indent", I've never thought about it that way before but yeah, it's basically true.
So, your function returns a called function into the outer scope which is able to call the function again. Without it, it would look for a function within the scope of the function (a nested function) and not find one.
You can have nested functions btw, but that's advanced.
@@davidmurphy563thank you ,I actually forgot about the issue 😅 I need to go back check again what was the issue because it’s been 1 month now and get to you back see your response if it makes sense ,thanks bro 😊
Hi Dave, thanks for the video, its really clear and concise, but I have a quick question, in lesson 12 at about 4 hrs 9 mins where you copy all the code and indent it forward, you use Shift and Tab key, please what else did you click, I'm finding it hard to align my code. Thanks.
HELP!!
Stuck at the end of chapter 2! I cannot get autopep8 to work. I couldn't find it in settings in the same way as here, I added the extension and I have it set as default but it won't auto format, whether using ctrl+s or right-clicking and selecting 'format document'.
Seems like they have changed the settings with an update. The documentation shows us the way forward: code.visualstudio.com/docs/python/formatting
@@DaveGrayTeachesCodeThank you Dave, great job you're doing!
Thank so much Dave.
That's amazing course.
I loved and learned a lot.
I'm at 5:20 and I got stuck because after installing the python extension and doing Ctrl+shift+P and pressing > Python Select Interpreter it gives me an error saying command 'python.setinterpreter' not found. I tried uninstalling reinstalling and restarting VSC but to no avail. even went into the user/.vscode/extensions area and there are no files for python in it either. Anyone know how to fix this?
Had the same issue, Uninstall and reinstall but make sure you check the two boxes (admin and path) and it will work also the new version you have to put Python -V for version
The formatting part, I did configure the "format on save", "format on save mode"=file, and the "python > formatting", but the control+s didn't fixed the extra spaces.
I uninstalled everything, cleaned up any older settings on "AppData\Roaming\Code" and still didn't work the of indentation, the rest of formatting works (no space between elements, for example.
Same issue. The formatting on save works fine except indentation. Have you found a solution?@@echofloripa
@@echofloripa Did you ever fix it? Im running into the same issue.
@@Kreiger81 wow, it's been a while, I actually switch to Dart/Flutter, and have not paying much attention to the issue 😁
Hi Dave, thanks for all you do for us :) any hint about what we can expect next?
Planning out future content now 🚀
I couldn't get the autosave function working on the current version of python (3.11.8) but after installing the autopep8 formatter it worked. You may also need to install some additional formatting 'tools'
The lessons are fantastic,but being a beginner to programming,I
would suggest to make it easy to rewind the lessons with an option to forward and backward for a period of 10 seconds.It would do a lot of good to us who are not English speaking natives
Finally❤❤❤Daves channel is the best channel. Next will be NEXTJS 13 compilation.
#lets_learn_together
#dave_is_the_best
Thanks bro from Uzbekistan !
Dave I have big problems getting autopep8 to work. I'm sure I did the right settings, however it's not working. I reinstalled VS CODE 3 times.
6:50 my terminal looks different, from top I have "PS C:\Users\my name>" written with grey letter, I want to write under it and I don't know how, when I click enter the text from the upper line just repeats itself and I have:
"PS C:\Users\my name>
PS C:\Users\my name>"
any help ?
The PS indicates you are using the PowerShell terminal. When you press enter as you described, it just goes down one line and gives you the same prompt. It is waiting for you to enter something.
@@DaveGrayTeachesCode 6:50 I have the same issue, on command prompt terminal i get the same prompt when pressing enter. I get the message "'py' is not recognized as an internal or external command, operable program or batch file." when trying to verify the python installation. What do I do?
My gosh, this gold!!! ty u so much!!
On your terminal screen on the far right, there is a column of square boxes with a '>' in them. My terminal has them, too. Is there a way to remove them and not inject them so that only the terminal is shown? Thanks.
This is just beautiful!
YOU ROCK!!