Lecture2 # Installation of pycharm in window and write our first program

Lecture2 # Installation of pycharm in window and write our first program

My Python codes: https://masterwithhamza@bitbucket.org/hamxaflutterapps/mypythoncodes.git

Step 1: Download PyCharm

  1. Visit the JetBrains website to download PyCharm: PyCharm Download

  2. You will see two versions of PyCharm: "PyCharm Community" (free) and "PyCharm Professional" (paid). For beginners, the Community version is sufficient. Click on the "Download" button for the Community version.

  3. Once the download is complete, run the installer.

Step 2: Install PyCharm

  1. Launch the PyCharm installer. You may be prompted for administrator permissions. Click "Yes" to continue.

  2. Select the installation type. The default settings should work for most users. Click "Next."

  3. Choose the installation location or leave it as the default. Click "Next."

  4. You can choose to create desktop shortcuts and associations for Python files. These are optional settings. Click "Next" to continue.

  5. Review your settings on the "Installation Options" screen and click "Install."

  6. PyCharm will now be installed on your system. Once the installation is complete, click "Next" and then "Finish."

Step 3: Configure PyCharm

  1. When you first launch PyCharm, it will ask you to configure some settings. You can choose your theme and keymap preferences. The default settings are fine for beginners. Click "Next."

  2. PyCharm will ask you to import settings from a previous installation (if you have one). For a fresh installation, select "Do not import settings" and click "Next."

  3. You'll be prompted to create a JetBrains account or skip this step. Creating an account is optional for using PyCharm Community Edition. You can skip it if you prefer.

  4. After configuring these settings, PyCharm will be ready to use.

Step 4: Write Your First Python Program

Now that you have PyCharm installed, let's write your first Python program:

  1. Launch PyCharm from the Start menu or desktop shortcut.

  2. In PyCharm, click "Create New Project."

  3. Give your project a name (e.g., "MyFirstPythonProject") and choose a location to save it. Click "Create."

  4. In the left sidebar, you will see your project name. Right-click on it and select "New" -> "Python File."

  5. Give your Python file a name, like "hello.py."

  6. In the editor window that opens, type the following Python code:

print("Hello, World!")
  1. Save the file by pressing Ctrl + S or File -> Save.

  2. To run your program, right-click anywhere in the code editor and select "Run 'hello'." You should see "Hello, World!" displayed in the console at the bottom of the PyCharm window.

Congratulations! You've successfully installed PyCharm on Windows and written your first Python program. You're now ready to explore more of Python's capabilities and start building your own projects.