Python Tutorial for Beginners with VS Code 🐍

Sdílet
Vložit
  • čas přidán 22. 07. 2024
  • Web Dev Roadmap for Beginners (Free!): bit.ly/DaveGrayWebDevRoadmap
    In this Python tutorial for beginners with VS Code, you will learn why you should learn Python, how to install Python, how to set up Python in VS Code, and how to execute Python code in VS Code. 🐍
    💖 Support me on Patreon ➜ / davegray
    ⭐ Become a full-stack dev with Zero To Mastery Courses:
    - The Complete Python Developer: bit.ly/CompPythonDev
    - Complete Machine Learning & Data Science: bit.ly/CompMachineLearning
    - Junior to Senior Dev Roadmap: bit.ly/WebDevRoadmap-JrtoSr
    🚩 Subscribe ➜ bit.ly/3nGHmNn
    📬 Course Updates ➜ courses.davegray.codes/
    ❓ Questions - Please post them to my Discord ➜ / discord
    ☕ Buy Me A Coffee ➜ www.buymeacoffee.com/davegray
    👇 Follow Me On Social Media:
    Github: github.com/gitdagray
    Twitter: / yesdavidgray
    LinkedIn: / davidagray
    🔗 Source Code: github.com/gitdagray/python-c...
    🔗 Playlist for this Python Course: bit.ly/dg-beginners-python
    Python Tutorial for Beginners with VS Code 🐍
    (00:00) Intro
    (00:14) Welcome
    (00:43) Why learn Python? I asked ChatGPT
    (01:21) Download & Install Python
    (02:19) Download & Install VS Code
    (03:01) Install Python Extension for VS Code
    (04:15) Set the Python Interpreter
    (05:04) Open a Terminal & Verify the Python version
    (07:05) The Python REPL
    (09:29) Create a Python file
    (11:19) Running the code in the Python file
    📚 Tutorial References:
    🔗 Python Official Site: www.python.org/
    🔗Visual Studio Code Official Site: code.visualstudio.com/
    🔗ChatGPT: openai.com/blog/chatgpt/
    Was this Python tutorial for beginners with VS Code helpful? If so, please share. Let me know your thoughts in the comments.
    #python #tutorial #beginners

Komentáře • 222

  • @DaNOliveiraDaN
    @DaNOliveiraDaN Před 4 měsíci +76

    Just started a Python course for beginners (Harvardx) and in the first class the teacher just said: open VSC and type this code. I didn't know where to get it, how to get it, if I needed to install python, how to install it, nothing. Needed to come here to learn that. Thank YOU and screw that teacher.

    • @kevintaylor8122
      @kevintaylor8122 Před 3 měsíci +5

      Same here.

    • @zeynab107
      @zeynab107 Před 3 měsíci +8

      same lol and I still don't know how he managed to create a new file by writing "code hello.py" in his terminal

    • @monseneur00economist
      @monseneur00economist Před 2 měsíci

      @@zeynab107because he’s in Harvards dev environment

    • @khalidmohammed6197
      @khalidmohammed6197 Před 24 dny

      can you please directe to this course link or which platform ?

  • @User.2024.1
    @User.2024.1 Před 6 měsíci +20

    Dave is my new favorite CZcams instructor.
    I started Python with Mosh paid version (the most popular on youtube too) but then switched to Dave's course and never looked back. Why? Mosh is only focused on syntax while Dave walks you through real projects and examples and best practices on how to use the language in real life. Subed. keep them coming!

  • @Piper_Pilot_Ventures
    @Piper_Pilot_Ventures Před 3 měsíci +2

    Hello! I just got python today and started to learn. I was sooooo confuesd about downloading python on virtua; studio code and I am so glad I found this video! You really went into detail, took your time, and went through the steps flaulessly. This really helped me and I hope to learn more from you.
    THANK YOU!

  • @kcell2042
    @kcell2042 Před rokem +16

    There are many other Python courses, but I've been waiting for Dave's Python course.
    Thank you!

  • @dickschweiger289
    @dickschweiger289 Před 7 měsíci +5

    Nice tutorial.
    Clear voice, straight on without a lot of bull talk.
    easy to understand, well thaught :)
    Subscribed.

  • @almightyyotto
    @almightyyotto Před 5 měsíci +7

    This video saved me big time before an assignment was due. After watching I learned more than I anticipated/was supposed to. Either way thanks Dave, I'll be back again.

  • @billwilson4956
    @billwilson4956 Před měsícem

    Thank goodness I found your videos before I got way down the road. They are the best.

  • @DevonieNelson
    @DevonieNelson Před 2 měsíci

    This was so thorough and helpful! So many tutorials that give direction with the assumption that you know certain things already, but you broke this down perfectly for a beginner. Thank you!

  • @ayfedtechnologies
    @ayfedtechnologies Před 4 měsíci

    Thanks for this video, i have decided to check this out instead of going around looking for Python Tutorials somewhere

  • @user-bl9fs9gn2d
    @user-bl9fs9gn2d Před 5 měsíci +2

    the only tutorial that made me get my head around it. thanks Dave

  • @baxtiyortursunov1494
    @baxtiyortursunov1494 Před rokem +6

    Thank you so much Dave, I was looking forward to seeing Python tutorials on your chanel, finally my dream came true, please keep making such excellent videos 😊

  • @Skullisho
    @Skullisho Před 5 měsíci

    Man this was nice, im an ICT student but my school doesnt teach code and all of our school computers are busted so self studying with your vids are really helpful

  • @caropazpm
    @caropazpm Před 10 měsíci

    This has been the perfect tutoriall for start (I played multiple ones) !! thanks

  • @martinbrault1563
    @martinbrault1563 Před rokem

    Thank you Dave... I've been always wanting to learn Python, and who better to learn it from than you? Love It!

  • @ranjanrnj6864
    @ranjanrnj6864 Před rokem +7

    Dave, I'm 100% sure it gonna be great playlist once again. Thank you!
    suggestion: Before directly jumping into the fundamentals it would be great to know details (under the hood how python communicates and executes, and how the memory are getting occupied and freed when the variables are used). Kind of 1 therotical video dedicated to this would be helpful to understand more clearly.
    THANKS IN ADVANCE!

  • @usmaanahmed9450
    @usmaanahmed9450 Před rokem +5

    Thanks Dave! really learned HTML from your channel please please continue this series !

  • @gaborbence6943
    @gaborbence6943 Před měsícem +1

    fantastic work. clear concise, many thanks sir! :)

  • @user-mb7le8ek7o
    @user-mb7le8ek7o Před 3 měsíci

    Great way to Teach. I will continue with the next videos. Thank you!

  • @clen9870
    @clen9870 Před 5 měsíci

    I do not know if comments are read on old videos, but I have to say the step-by-step guide and your explanations are excellent. I will be liking and subscribing and look forward to learning more.

  • @MegaJohn144
    @MegaJohn144 Před 9 měsíci +1

    I only install a new version of Python once a year when the new version comes out, but here's a word of caution for all Windows users. I keep forgetting this and having to re-learn it the hard way. Run the setup in Admin mode. Don't take any of the defaults when you understand Python. Click the option whare you choose what to install. Be sure and add Python to your PATH, and install Python for ALL user. Do everything in admin mode. I forgot to do this and wound up having to install and uninstall three times before I finally got it right.
    Up till now, I have been using Sublime Text for my development, but I saw some new videos about using VS Code. I am going to try it, and this is the reason why I am watching this.

  • @codernerd7076
    @codernerd7076 Před rokem

    Awesome to see some Python content as well! it's the nr1/2 most favorite program language every year it seems!

  • @michaelhudson2375
    @michaelhudson2375 Před 10 měsíci +3

    Great content, well presented & explained. As a learner half the battle is getting the confidence to keep going and I was able to follow this video and have it work exactly as shown. Thank you. Also appreciated the information about VS Code and especially using the terminal, which can be a scary place to go for a beginner. Looking forward to completing the whole playlist.

  • @butterfly5572
    @butterfly5572 Před 8 měsíci

    Thanks to the friend who sent me this link. I got the confidence in learning VS with python.

  • @webdeveloper2795
    @webdeveloper2795 Před 6 měsíci

    Dave => Real Mentor for JavaScript and python

  • @Jiv_the_protogen
    @Jiv_the_protogen Před 9 měsíci

    your literary helping my course in my collage thank you for making this very understandable

  • @idevbrandon
    @idevbrandon Před rokem

    Thank you Dave! My first PY practice and trial on other lang apart from JS!

  • @user-dw3cd3jy7j
    @user-dw3cd3jy7j Před 2 měsíci

    Thank you Dave for making it easy

  • @baranip1331
    @baranip1331 Před 11 dny

    Nice Dave, Keep going !! 🙂

  • @omarakki705
    @omarakki705 Před rokem

    you are the best teacher i have ever seen, thanks dave

  • @folajhimie
    @folajhimie Před rokem

    I actually Consumed all your Javascript, and React.js including ur Node.js Tutorials... And I can say ur teachings made me a better Developer... the Timing is perfect was about to jump on Python only to come across ur Python Tutorial for Beginners... I am so excited, I believe u would do justice to this as u did for Javascript... Looking forward to touching on Python frameworks like Django, fast API, and Flask... Thanks, Dave Dray

  • @manuelk64
    @manuelk64 Před rokem

    Thanks a lot for this course, Mister Dave Gray! 😊

  • @kylesanders852
    @kylesanders852 Před 7 měsíci

    Bro you explained that so well. Thank you

  • @neetubajwa01
    @neetubajwa01 Před 5 měsíci

    Very good lesson explained in a simple way!

  • @bastiane215
    @bastiane215 Před rokem

    I used to be learning code in python with vs code but I left because I had so much troubles with it. I checked all from the beginning and I find the problem ... Thank to you, I´m getting comfortable with the platform again and I hope I can boost my knowledge . Thank you!

  • @georgep779
    @georgep779 Před 3 měsíci

    you are born to be a professor. Too good instructions. Nice

  • @user-fz4yt6xw7w
    @user-fz4yt6xw7w Před měsícem +1

    when I write py -3 --version on my windows(11) . it says py is not recognized as an internal or external command..... i chose command prompt . what to do???

  • @newtonwakhungu9597
    @newtonwakhungu9597 Před 9 měsíci

    Thanks Dave we need the in_depth of python using this editor..Thanks alot

  • @e.m.janssen3638
    @e.m.janssen3638 Před 2 měsíci

    Thank you, super helpful.

  • @curtpw
    @curtpw Před 6 měsíci

    @anyone. I hit CTRL+N to create a new file and then I couldn't type anything until I tapped the "a" key and then the cursor changed. Should this be? I didn't see Dave mention anything like that. Open to any advice or direction for more reading.

  • @shivendra3019
    @shivendra3019 Před rokem +7

    At first I thought this will be a next js course video but I understand why python as it is very flexible and more easy to learn programming language which will benefit many people including a lot of beginners as their first choice of programming language. Thank you very much sir.

  • @yw3546
    @yw3546 Před rokem

    Couldn't wait for your flask tutorial!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem

      I don't have one yet, but after the Python for Beginners series I will get into other topics with Python.

  • @mo7sin711
    @mo7sin711 Před 2 měsíci +1

    I get this error message when I try to verify my version or type py in the terminal:-
    path was included, verify that the path is
    correct and try again.
    At line:1 char:1
    + py -3 --version
    + ~~
    + CategoryInfo : ObjectNotFound: (py
    :String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundExce
    ption

  • @AuronL513
    @AuronL513 Před měsícem

    Hi Dave, I did all of what you said in the video. However, there seems to be something wrong when my file executes the program. Because it never shows the Hello World. It just prints the locations of my python interpreter location and the file location, I do not know why.

  • @Valdaur
    @Valdaur Před rokem

    Good introduction, I've been feeling a bit lost as to which direction to take as of late. I'm still slowly getting through your CSS tutorials, but I feel that I want to try something else as well just in case it doesn't lead to much in terms of future prospects. So I think learning a programming language like Python will be useful as I know it's quite popular and there's lots you can do with it. Looking forward to getting to the stage where I can get past the basics and build some personal projects.

  • @parenteseswebdev
    @parenteseswebdev Před 4 měsíci

    What do I type on a mac as Python doesn't work. I followed along and got the version, but after than errors.

  • @halfninja3499
    @halfninja3499 Před 4 měsíci +1

    Anyone able to give me a ahand py isn't working on my windows cmd it give me the error "'py' is not recognized as an internal or external command,
    operable program or batch file." Thanks!

  • @sdfsfsfd437
    @sdfsfsfd437 Před rokem

    Great! I had to learn Python! Thanks a lot!

  • @nayahejazi7668
    @nayahejazi7668 Před 10 měsíci

    I am using a Mac, and I dont every step until you typed "Python; select interpret" it said "not found.

  • @lionfearmotivation
    @lionfearmotivation Před 5 měsíci

    Been trying to get python working but kept failing. It was giving me a headache lol. Your video was Amazing, its now working ok. What a fantastic learning video.

  • @ogt1407gabriel
    @ogt1407gabriel Před rokem

    cant wait for the next episode of this series

  • @jaysonnelson5396
    @jaysonnelson5396 Před 6 měsíci

    Dave and all, when you run a python file I notice that the next line of code in the terminal keeps you in the same directory. In my case, the next line of code takes me back to my home directory. How can I make it so that when running python files, the next lines of code in the terminal keep me in the same directory?

  • @dafiraone
    @dafiraone Před rokem

    We're going python! Thank You Dave

  • @deeptib3123
    @deeptib3123 Před 11 měsíci

    Thanks, for the tutorial you made it understandable. My question is if i want to make notes for Python or a note-taking app. What and Which app would you suggest, apart from Jupyter which am learning....

  • @soumadip_skyy_banerjee
    @soumadip_skyy_banerjee Před rokem +23

    Whenever Mr.Gray's vid comes out! I hit the like! ❤️

  • @xNibsu
    @xNibsu Před 3 měsíci +4

    I just started to learn this python thing and noticed that in Python 3.12 Windows version, you also have to use "python" instead of just typing "py". Not sure is it just me but it is what it is.

    • @mila_a0441
      @mila_a0441 Před 2 měsíci

      hi sorry but when i use py or python on the terminal it says that it's not recognized as a command?

  • @YigalBZ
    @YigalBZ Před rokem

    Thanks for a clear video. Are you going to explain how to install Python packages with VScode?

  • @CDeeMondays
    @CDeeMondays Před 3 měsíci

    many thanks from the bottom of my heart!

  • @rohitsingh-xj1ey
    @rohitsingh-xj1ey Před rokem

    Thank you so much for all your efforts continue the good work ..

  • @muzhaffarhaydar7928
    @muzhaffarhaydar7928 Před 5 dny

    thanks dave

  • @alexlim6300
    @alexlim6300 Před 8 měsíci

    C:\Users\Alex\lesson1> py
    'py' is not recognized as an internal or external command,
    operable program or batch file.
    when I type py into the command prompt

  • @sabertoothgamerz1750
    @sabertoothgamerz1750 Před 2 měsíci

    why does my vs code say that the python interprator is invalid?

  • @chipashawalichupa
    @chipashawalichupa Před 2 měsíci

    Hello, I have a problem in python it does not ring no matter how many videos I watch I can't figure it out, please help.

  • @abdulrahmanagboolaosho3582

    You dont know how happy I am that you made a python course, please touch frameworks such a django in future tutorials, thank you sooo much dave

  • @mml_mokhethea
    @mml_mokhethea Před rokem +1

    Thank you very much Mr Dave with your great courses I can't wait for a full course of this 🐍!!

  • @CTILET
    @CTILET Před rokem

    Ooo Dave! You are best in all programing languages

  • @zoltanmolnar6956
    @zoltanmolnar6956 Před rokem +1

    Man! you are just amazing. Please do not forget Django as well! Thank you!

  • @akintobby
    @akintobby Před rokem +1

    I've been so skeptical about learning python but since you are d one teaching it, I will learn😋😋

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem +1

      Glad to hear that! Learning Python is a great additional skill even if you already know JavaScript.

    • @akintobby
      @akintobby Před rokem

      @@DaveGrayTeachesCode Thank you so much for everything sir🙏🙏

  • @ThuyLe-sy6zn
    @ThuyLe-sy6zn Před 6 měsíci

    thank u Dave !

  • @khalidakhan6089
    @khalidakhan6089 Před rokem

    Thanks very much,Sir. Please teach in-depth Python programming to an expert level. I like your teaching and vivid explanation method. I've learned so much from you.
    Stay Blessed.

  • @primeweird
    @primeweird Před rokem

    amazing, tutorials dave!!, please also make series on node with sequelize (ORM) MySQL

  • @xzex2609
    @xzex2609 Před 9 měsíci

    is there any complete course like js 8 Hour or other tutorials ? I see some advance stuff in these videos and It's really convenient for me to download the whole video to follow along . the only thing is I always jump back to like and like again cause I really appreciate how valuable these course are. I wish he make a advance course and learn us how to deal with packages like I see in his virtual environment ( request package) cause those stuff are rare and you got to deal with then in web sites. like I had problem how to hide the API key for a program that I wrote , and accidentally I saw it in one of his beginner videos that really helped me a lot.

  • @Micahkunn
    @Micahkunn Před 2 měsíci

    thanks man

  • @jorgeacosta1740
    @jorgeacosta1740 Před 2 měsíci

    When I do command shift p and type in python nothing shows up

  • @bmehder
    @bmehder Před rokem

    Python is really nice to look at. I love JS in all of its strangeness, but I am looking forward to learning what a normal programming language feels like.

  • @ahzidmahmood6904
    @ahzidmahmood6904 Před 8 měsíci

    i am really struggling with this having to keep deleting and reinstalling vs code

  • @Tebarek
    @Tebarek Před rokem

    Great job dave pleas keep up

  • @kevinerose
    @kevinerose Před 5 měsíci

    When I updated Python, it placed the newer version in a different location. Should I uninstall and reinstall? When I try to add libraries, it keeps pointing them to the older version. I can just copy my library folder but I don't want to keep doing that.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před 5 měsíci

      This article includes how to configure the Python path: blog.enterprisedna.co/where-is-python-installed/

  • @mohdiq7124
    @mohdiq7124 Před rokem

    Thanks Dave, Please continue python programming .. ✋

  • @josephagbo2908
    @josephagbo2908 Před 11 měsíci

    This went a long way!!

  • @PIKACHUHraje
    @PIKACHUHraje Před 2 měsíci +2

    Hello, I´m begginer at programming and I want to learn how to code in Python. But when I type in the "cmd" command "py -3 --version" It just says "'py' is not recognized as an internal or external command,
    operable program or batch file." and I don´t know how to fix it. Any advice please?

    • @nick11jl
      @nick11jl Před měsícem

      same issue here, i have 0 idea what to do

  • @galaxian_wanderer
    @galaxian_wanderer Před rokem

    Dave I want to ask that what to do when the terminal says-
    File "", line 1
    after i wrote quit{} and pressed enter

  • @Mrlyricsman28
    @Mrlyricsman28 Před 2 měsíci

    In my VS Code it doesn't show the terminal

  • @avelinecash
    @avelinecash Před rokem

    thanks dave!

  • @mohammadnabil6556
    @mohammadnabil6556 Před rokem

    Thanks a lot mr gray

  • @RISHIKESHSINGH-ex7vj
    @RISHIKESHSINGH-ex7vj Před 11 měsíci

    Thank you

  • @chipashawalichupa
    @chipashawalichupa Před 2 měsíci

    Just started python it is not running please help me

  • @tibslikewiser863
    @tibslikewiser863 Před 10 měsíci

    Im on windows py -3 --version wont bring up the version only python3 --version brings up the python version for windows very first time learning this its actually discouraging already to be honest my ultimate goal is to make 2d games

  • @cbbcbb6803
    @cbbcbb6803 Před rokem +1

    You should use light theme on your tutorials. Some of us are using smaller screens to watch your videos. Dark screens do not display as clearly as light themes do. A large computer monitor may (in fact it does) display dark theme better than small ones do. Besides, the brightness of a large monitor can be adjusted if it is too bright.

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem +1

      My eyes can't handle the light mode and using light mode would generate far more complaints. This is the first request I've ever received for light mode.

  • @Fush2
    @Fush2 Před 11 měsíci +1

    never thought gabe newell would teach me python

  •  Před 17 dny

    Why all the tutorials are always over dark interfaces, I can't see any tutorial from my e-ink devices. 😢

  • @Valdaur
    @Valdaur Před rokem +1

    I can't seem to verify the Python version using the terminal. I keep getting an error saying: '$' is not recognized as an internal or external command, operable program or batch file.
    Edit: Never mind, I just realised it's probably a bash command. Typing in the code without the '$' works fine.

  • @funkdoc2001
    @funkdoc2001 Před rokem +1

    More Python content please 🙏

  • @MoZeDtheMonkey
    @MoZeDtheMonkey Před rokem

    awesome tutorial, what theme and icons are being used here? It looks good, appreciate you in advance!

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem

      Thank you!
      My theme choices: czcams.com/users/shortsdp4u1NNFhtE
      My VS Code icons: czcams.com/users/shorts-uhzj-kjfV4
      Add font ligatures: czcams.com/users/shortsf1HVI5slxms

  • @abinashmandal6202
    @abinashmandal6202 Před rokem

    Thank you for everything. Also please consider making course on firebase in near future.

  • @rohitsingh-xj1ey
    @rohitsingh-xj1ey Před rokem

    In Your python playlist, it's showing 3 videos but 2 are unavailable till date.

  • @mortezafarhangpanah256

    thanks

  • @maleeshamevan
    @maleeshamevan Před rokem

    thankyou

  • @88kaizen888
    @88kaizen888 Před 11 měsíci

    beginner here thanks for this content .i couldn't download pycharm .....

  • @teetanrobotics5363
    @teetanrobotics5363 Před rokem

    Thanks for the upload. However, would prefer a Next js course. Since there are lot of terminologies like SSG, SSR, ISR, etc. which many people find confusing. Request you for the same

    • @DaveGrayTeachesCode
      @DaveGrayTeachesCode  Před rokem

      Coming Friday. I've been doing beginners topics on Tuesdays and more advanced on Fridays.

  • @hosbalcantos7399
    @hosbalcantos7399 Před 10 měsíci +1

    how did u create you file lesson01?

    • @user-tb3dj3km2p
      @user-tb3dj3km2p Před 4 měsíci

      I thought I was the only one stuck on this issue