Saltar al reproductorSaltar al contenido principalSaltar al pie de página
  • ayer
How to Create & Run Your First Python Program in PyCharm | Beginner’s Guide

Ready to dive into Python programming? In this tutorial, you’ll learn how to create and run your first Python program using PyCharm, one of the most popular Python IDEs. Whether you’re just starting out or looking to sharpen your skills, this step-by-step guide will walk you through the entire process of setting up PyCharm, writing your first Python script, and running it successfully.

---

Key Topics Covered:

#### 1. *Installing PyCharm*
Quick guide to downloading and installing PyCharm on your system.
Choosing the right PyCharm edition for beginners (Community Edition).

#### 2. *Setting Up a Python Project in PyCharm*
How to create a new Python project.
Configuring the Python interpreter for your project.

#### 3. *Writing Your First Python Program*
Creating a Python file and writing the "Hello, World!" script.
Understanding basic Python syntax and structure.

#### 4. *Running Your Python Program*
How to execute your Python script from within PyCharm.
Using the PyCharm terminal and run configurations.

#### 5. *Exploring PyCharm Features*
Code suggestions, auto-completion, and error checking in PyCharm.
Navigating between files and managing project structure.

#### 6. *Debugging Your Code*
Introduction to debugging tools in PyCharm.
How to set breakpoints and step through your Python code.

---

Why Choose PyCharm for Python Development?
PyCharm is an IDE specifically designed for Python development. With powerful features like intelligent code assistance, a built-in debugger, and version control integration, PyCharm provides an excellent environment for both beginners and advanced developers.

---

*Get Started with Python in PyCharm Today!*
Follow this tutorial to set up PyCharm, write your first Python program, and start coding in no time. With PyCharm's rich set of tools and support for Python, you'll be up and running with Python projects in no time.

Categoría

📚
Aprendizaje
Transcripción
00:00Hey guys, in this video we are going to see how we can install PyCharm on our Windows Operating System.
00:06So the prerequisite of installing PyCharm on our Windows Operating System is that you need to have Python installed on your Windows Operating System.
00:16So if you don't know how to install Python, I have already created a video about it and I will put the link of that video in the description of this video so you can watch that video.
00:25So once you have Python, let's start with the installation and setup of the PyCharm IDE.
00:31So for that, just open your favorite browser and search for PyCharm and the first link which will appear here will be from jetbrains.com forward slash PyCharm.
00:41So we are going to click on this link.
00:43So once this website opens, just scroll down a little.
00:46You will see a download button here or you can also see the download button at the top right hand corner.
00:52So just click on the download button wherever you see it on the screen and then you will be able to see two versions of PyCharm.
01:03First one is the PyCharm Professional which is the paid version.
01:08If you want, you can also install this PyCharm Professional if you want to use it in your workplace or at your job.
01:17If you want the community version which is a free version, then you need to scroll down a little and here you will be able to see this PyCharm Community Edition which is free and open source.
01:32So in this case, we are going to install the PyCharm Community Edition, just click on the download button under this Community Edition and it's going to start the download of this PyCharm IDE Community Version exe file.
01:48And once this exe file is downloaded, just click on this PyCharm Community exe file and let me minimize the browser and the setup wizard for the PyCharm will start in a few seconds.
02:02So first of all, you will see this kind of message which says, do you want to allow this app to make changes on your device?
02:08I will click on yes here.
02:09And then you can see PyCharm Community Edition setup wizard has been started.
02:17So at this point, just click on the next button and this will be the location where PyCharm will be installed.
02:24So if you don't have the good reason to change this location, just leave it as default and then click on next.
02:30And then you have this installation options.
02:36So if you want to create a desktop shortcut, check on this checkbox.
02:41And then if you want to update path variables, check on this checkbox.
02:47If you want to update the context menu, check on this checkbox.
02:51And also if you want to create associations with your .py files, check on this checkbox.
02:57So in my case, I'm going to check all these checkboxes and then click on next.
03:01And now on the next window, it says choose startup menu folder.
03:05I'm going to leave it as default, which is JetBrains.
03:08And then click on install, which is going to start the installation of PyCharm IDE.
03:13So now I can see this message which says completing PyCharm Community Edition setup.
03:18And at this point, you need to reboot your Windows operating system.
03:22So just click on this reboot now radio button and then click on finish, which is going to restart your Windows operating system.
03:33So once the Windows operating system restarts, we are going to check whether PyCharm is functioning properly or not.
03:41So for that, just click on this Windows icon and then click on all apps here and then just scroll down a little where you will see the PyCharm Community Edition icon.
03:52So I'm going to click on this icon here, which is going to launch this IDE.
03:58So you can see the PyCharm IDE now has been launched.
04:03So first of all, you will see this PyCharm user agreement.
04:06So you can go through this text.
04:09And if you agree with the license terms and conditions, just click on this checkbox, which says I confirm and then click on continue.
04:17And on the next window, you will see the data sharing window.
04:20So if you want to share some data with the JetBrains, you can click on send anonymous statistics button.
04:27Otherwise, click on don't send.
04:30So in my case, I'm going to just select don't send here.
04:33And now you will see this kind of window if you have installed Visual Studio Code.
04:39So I have already installed Visual Studio Code.
04:41So it's going to ask you if you want to import settings from your Visual Studio Code or not.
04:48For now, I don't want to do that.
04:49So I'm going to click on skip import.
04:52And you can see the PyCharm IDE has been launched now.
04:56Now you can see some options on the left hand side here, right?
05:00So first one is the projects option.
05:03Second one is the customize option.
05:05So we are going to click on this customize option here.
05:08And you can see from the customize settings, you can change the theme of your PyCharm IDE.
05:16You can also change the language and region.
05:20And you can also change the IDE font size.
05:24And other related settings are also given here, right?
05:27So if you click on all settings, you will be able to see some extra settings in your PyCharm, which you can change.
05:35For now, I will leave everything as default.
05:38And then I'm going to click on the projects section.
05:41And I'm going to create a new script.
05:44So I'm going to just select a new script here.
05:47And this is going to prepare the environment for me.
05:51And then it's going to give you this kind of window, which says trust and open project with the project name.
05:57I'm going to just check this checkbox, which says trust all project in CodeBind folder, which is my username.
06:05And then I'm going to just click on this trust CodeBind folder button, which is going to create and open my project here.
06:14And it's going to show you this kind of window.
06:17So right now you can see updating some interpreters.
06:22So just wait for a few more seconds until you see your script.
06:26So once you see your project here, this is the default script, which is created by PyCharm for you, which have one function.
06:35Which prints the high and the name, which is given as an argument.
06:41And the argument which is passed here is this PyCharm text here, right?
06:46So when we want to run our code, I can click on this run script.py button, which is going to run this script and show me the output.
06:57And you can see it runs the script and I can see the high PyCharm here.
07:02So everything is working fine with my PyCharm IDE.
07:06Also at the bottom, you can also see the project name and you can also see which Python version is used by your PyCharm.
07:16So in my case, I have pre-installed Python 3.13.
07:19So I can see it here and when you click on this option, you will be able to add new interpreters.
07:27So you can see the default one is the one which I have installed previously using the Python website, right?
07:35But if you want, you can add new interpreters.
07:39So click on add new interpreters and then click on add local interpreter and you will be able to add more interpreters using this option.
07:52So you can see when you click on this drop down menu, this one is the default one.
07:57But if you want, you can download the previous versions of Python and then you will be able to install this on your system and you can use those versions.
08:10So for now, let me close this window and this is how you can run your Python script within your PyCharm IDE.
08:19So that's it for this video.
08:21I hope you have enjoyed this video and I will see you in the next video.

Recomendada