• Home
  • Subscribe
  • Contribute Us
    • Share Your Interview Experience
  • Contact Us
  • About
    • About CSEstack
    • Campus Ambassador
  • Forum & Discus
  • Tools for Geek
  • LeaderBoard
CSEstack

What do you want to Learn Today?

  • Programming
    • Tutorial- C/C++
    • Tutorial- Django
    • Tutorial- Git
    • Tutorial- HTML & CSS
    • Tutorial- Java
    • Tutorial- MySQL
    • Tutorial- Python
    • Competitive Coding Challenges
  • CSE Subject
    • (CD) Compiler Design
    • (CN) Computer Network
    • (COA) Computer Organization & Architecture
    • (DBMS) Database Management System
    • (DS) Data Structure
    • (OS) Operating System
    • (ToA) Theory of Automata
    • (WT) Web Technology
  • Interview Questions
    • Interview Questions- Company Wise
    • Interview Questions- Coding Round
    • Interview Questions- Python
    • Interview Questions- REST API
    • Interview Questions- Web Scraping
    • Interview Questions- HR Round
    • Aptitude Preparation Guide
  • GATE 2022
  • Linux
  • Trend
    • Full Stack Development
    • Artificial Intelligence (AI)
    • BigData
    • Cloud Computing
    • Machine Learning (ML)
  • Write for Us
    • Submit Article
    • Submit Source Code or Program
    • Share Your Interview Experience
  • Tools
    • IDE
    • CV Builder
    • Other Tools …
  • Jobs

Pycharm Python Tutorial | Setup and Running Your First Program

Aniruddha Chaudhari/46599/12
CodePythonSoftware Installation

Are you looking for IDE for Python coding practice or developing projects?

Python is getting more popular. And one of the biggest reasons for its popularity, it is so simple, elegant, and easy to learn. It has a huge scope and has more demand for Python developers in the IT industry.

It is claimed that the requirement for skilled Python developers in the IT industry is still a major concern. Google, Quora, Dropbox, Yahoo Maps, Reddit, YouTube are the few giant companies working on Python projects. For sure, there is a great future for Python developers.

Let’s look at this tutorial where I will explain setting up Python, configuring the best Python IDE, and starting to learn Python.

If you are looking for career opportunities in the software industry or want to learn programming skills, start fuelling Python skills. It will be paid off one day, for sure.

In this post, we see how to install and configure PyCharm as the best Python IDE on Windows.

Software required to setup Python Environment on Windows:

  • Python 3.6 or Python 2.7 (Latest version- you can choose any of the version as you are comfortable with)
  • PyCharm IDE (Best Python IDE)

Note: If you are learning Python and want to practice coding, you can always use CSEstack online Python IDE. You don’t need any setup on your computer. Open the link and use it. Pretty simple!

How to Install Python on Your System?

If you have Python already installed on your system, you can skip this step. And move to the next step for installing PyCharm IDE.

Download the latest version of Python from its official website. Mainly there are two Python stable and latest versions, one is Python 3.6 and the other is python 2.7. You can download it from its official website Python.org.

If you are new to Python programming, I would recommend using Python 3.6.

Once downloaded install it on the system.

You can also follow:

  • Installing Python on Linux (Ubuntu/Fedora/CentOS…)
  • Installing Python on Windows (getting started with Python And Running First Program)

If you are installing Python on Windows, you can skip the links shared above. Instead, keep reading below.

I am demonstrating the installation of Python 3.4 here.

Double click on the Python executable file you have downloaded.

It saves in a c://python34folder by default.

Python installation with Multiple Version


Note: If you are installing Python 2.7 then it gets installed in c://python27 folder. As the directory name is created according to the version of Python, it is possible to install multiple pythons on the same system. It does not create any conflict among multiple Python versions installed on your system. And it works independently.

Click on the “Next” button and complete the installation.

Write a simple program to test if the Python installation successfully completed or not.

Open Python console or open command prompt and type “Python3”

If you installed Python version 2, use the command “Python” in the command console.

Here I am simply setting two variables with integer values and performing sum operation.

check python installation to work fine

Now Python installation is completed. That’s Great!

If you have entered so many commands, you can clear the Python interpreter console.

Working on a command prompt to code a Python program is a really tedious and time-consuming task. The Python interpreter console is good for writing the small script and running instantly. You cannot write a program on the Python interpreter console and save it to run later.

To develop the project in Python, you need to Integrated Development Environment (IDE) just like for many other programming languages.

Which is the best IDE for Python?

You can use any IDE or text editor for writing Python code. I recommend you to use PyCharm IDE for Python to code programs. It will help you to integrate multiple Python programs into a single project. This IDE also provides the environment to work on multiple projects.

PyCharm Installation and Integration

PyCharm is the best Python IDE provided by JetBrains. You can download PyCharm installation software from its official website Jetbrains.  It is available for Linux, Windows, and OS X.

Download PyCharm for Windows and install it on the system.

Best Python IDE

While installation you need to configure to open Python file by default in PyCharm. Click on create association check box. It will associate every python file on your system with PyCharm.

configure python with pycharm

If you have a Python setting for the previous Python version on your system, you need to import Python projects setting for a particular Python version.

If you are installing Python the first time and there are no other Python versions installed on your system, choose not to have a previous version.

import previous python project if any

That’s it! You are done with installing Best IDE for Python.

There is nothing difficult in it, right?

Now, let’s try running the Python program in Pycharm.

Writing Your First Python Program in PyCharm IDE

Once the installation and configuration of Pycharm are completed, create a new project.

Create new python project in pycharm

Set new project name and location for project repository where you want to save project source files.

Set Python project name

Pro Tips:

One of the major differences I found between a normal and expert programmer, expert programmer always keeps shortcuts handy. That makes their coding standard and as well as faster than the normal programmer.

PyCharm shortcuts to run Python project

You can keep in mind some of the shortcuts that require frequently such as keyboard shortcuts for running and debugging the program.

Create New Project:

Click right on the newly created python project. Select: New >> Python File.

Create python file in project

Write first hello world program in the new project.

print ("Hello World!");

Run the program. You can see the output in the run console as “Hello World!”

write hello world python program

Note: Program syntax can vary as per the Python version you are using. Here I am using Python 3.4.

What’s Next?

Installing and configuring Python on your system is the first step to getting into Python. I have curated a complete Python tutorial. The best thing is you don’t need to pay anything to learn Python. It is completely available for FREE. Go through it and master Python programming.

That’s all from this tutorial. I hope you enjoy it reading and implementing it.

If you have any doubt regarding Pycharm configuration or Python setup, feel free to comment below. I will revert to you as soon as possible.

Happy Coding!

PyCharmPython
Aniruddha Chaudhari
I am complete Python Nut, love Linux and vim as an editor. I hold a Master of Computer Science from NIT Trichy. I dabble in C/C++, Java too. I keep sharing my coding knowledge and my own experience on CSEstack.org portal.

Your name can also be listed here. Got a tip? Submit it here to become an CSEstack author.

Comments

  • Reply
    Aswin Sighwi
    April 11, 2016 at 10:54 am

    Earlier I was using Python over command. PyCharm is so user friendly and useful for work efficiency.

    Thank you for sharing Aniruddha!

    • Reply
      Aniruddha
      July 13, 2016 at 11:58 am

      I also find IDE as more useful for building projects. It resolve dependency among multiple python scripts.

      You are Most welcome, Aswin!

  • Reply
    Jimmy
    January 4, 2017 at 9:50 pm

    There is certainly a lot to learn about Python. Tutorial points you have mentioned are really informative.

    • Reply
      Aniruddha Chaudhari
      March 11, 2019 at 9:17 pm

      Thanks, Jimmy. Glad to see you here.

  • Reply
    Brecht
    April 3, 2017 at 2:33 pm

    I have a question.
    Can you make project whit python that also have HTML emand CSS?
    Or can you juste make a website with python?
    I’s juste to know

    • Reply
      Aniruddha Chaudhari
      April 3, 2017 at 4:47 pm

      Yeah, absolutely you can make a website with Python from a small scale website to enterprise level. There are also some web frameworks in Python.

      If you are interested in making a website using Python, you can start using bottle framework. It is easy and very simple.

      Here (link: http://www.csestack.org/python-web-development-bottle-framework/ ) you can read more about bottle framework.

  • Reply
    Paul A. Gureghian
    July 11, 2018 at 10:21 pm

    Are you still monitoring this story ? I have a question

    • Reply
      Aniruddha Chaudhari
      July 11, 2018 at 10:33 pm

      Yeah.

      Please feel free to ask your question, Paul.

  • Reply
    Adonis
    March 11, 2019 at 9:13 pm

    Hi. I’m Adonis from Romania and wanna learn to programme in python… Can you tell me please tell me from where to start? Or what is the easiest way to start. Thanks, Aniruddha!

    • Reply
      Aniruddha Chaudhari
      March 11, 2019 at 9:16 pm

      Hi Adonis, refer complete Python tutorial for beginners.

  • Reply
    Stas
    January 25, 2022 at 7:34 pm

    My preferred online Python IDE.

    • Reply
      Aniruddha Chaudhari
      January 26, 2022 at 9:15 pm

      Then you might like our CSEstack Python IDE.

Leave a Reply Cancel reply

Basic Python Tutorial

  1. Python- Tutorial Overview
  2. Python- Applications
  3. Python- Setup on Linux
  4. Python- Setup on Windows
  5. Python- Basic Syntax
  6. Python- Variable Declaration
  7. Python- Numeric Data Types
  8. Python- NoneType
  9. Python- if-else/elif
  10. Python- for/while else
  11. Python- User Input
  12. Python- Multiline User Input
  13. Python- String Formatting
  14. Python- Find Substring in String
  15. Python- Bitwise Operators
  16. Python- Range Function
  17. Python- List
  18. Python- List Vs Tuple
  19. Python- Compare Two Lists
  20. Python- Sorting List
  21. Python- Delete Element from List
  22. Python- Dictionary
  23. Python- ‘is’ vs ‘==’
  24. Python- Mutable vs Immutable
  25. Python- Generator & Yield
  26. Python- Fibonacci Generator
  27. Python- Assert Statement
  28. Python- Exception Handling 
  29. Python- RegEx
  30. Python- Lambda Function
  31. Python- Installing Modules
  32. Python- Important Modules
  33. Python- Find all Installed Modules
  34. PyCharm- IDE setup
  35. Python- File Handling
  36. Python- Monkey Patching
  37. Python- Decorators
  38. Python- Instance vs Static vs Class Method
  39. Python- Name Mangling
  40. Python- Working with GUI
  41. Python- Read Data from Web URL
  42. Python- Memory Management
  43. Python- Virtual Environment
  44. Python- Calling C Function

Python Exercise

  1. Python- Tricky Questions
  2. Python- Interview Questions (60+)
  3. Python- Project Ideas (45+)
  4. Python- MCQ Test Online
  5. Python- Coding Questions (50+)
  6. Python- Competitive Coding Questions (20+)

Python String

  1. Reverse the String
  2. Permutations of String
  3. Padding Zeros to String/Number

Python List

  1. Randomly Select Item from List
  2. Find Unique Elements from List
  3. Are all Elements in List Same?

Python Dictionary

  1. Set Default Value in Dictionary
  2. Remove all 0 from a dictionary

File Handling

  1. Python- Read CSV File into List
  2. Check if the File Exist in Python
  3. Find Longest Line from File

Compilation & Byte Code

  1. Multiple Py Versions on System
  2. Convert .py file .pyc file
  3. Disassemble Python Bytecode

Algorithms

  1. Sorting- Selection Sort
  2. Sorting- Quick Sort

Other Python Articles

  1. Clear Py Interpreter Console
  2. Can I build Mobile App in Python?
  3. Extract all the Emails from File
  4. Python Shell Scripting

© 2022 – CSEstack.org. All Rights Reserved.

  • Home
  • Subscribe
  • Contribute Us
    • Share Your Interview Experience
  • Contact Us
  • About
    • About CSEstack
    • Campus Ambassador
  • Forum & Discus
  • Tools for Geek
  • LeaderBoard