This is saif, working on a Research based Project and writing this tutorial titled as “Getting Started with Python Programming using PyCharm IDE”. This article is for beginners who want to get their journey started in programming world using Python Programming language. It will also be helpful for those who are already familiar with some other programming language and want to learn Python.
After basic introduction to Python and PyCharm, this article will guide step by step how to write first program in Python using PyCharm as an IDE. Let’s Begin.
Basic Introduction of Python and Pycharm
Python is open-source, general-purpose, high-level, dynamically typed programming language. Python files have .py extension.
User friendliness and Simple Syntax makes Python best for Programmers especially beginners, to learn and understand it quickly.
Python is one of the most widely used programming language having its applications in different areas:
- Back-end web development
- Data analysis
- Artificial intelligence
- Scientific computing
- Productivity tools, games, and desktop applications
IDEs (Integrated Development Environments) Used for Python
- PyDev with Eclipse
- Eric Python
- Spyder Python
- Netbeans (python plugin)
- Visual Studio (python tools)
We will use PyCharm as an IDE in this tutorial. PyCharm is a full featured IDE for Python provided by JetBrains. It is designed for programmers, to provide all the tools you need for productive Python development. It will facilitate you with the following features:
- Intelligent Python Assistance
- Web Development Frameworks
- Scientific Tools
- Remote Development Capabilities
Getting Started with PyCharm
- Download and install Python from here
- Download and install PyCharm from here
- Open PyCharm and Create a new Project Either from Welcome Screen
- Or from menu bar: File -> New Project
- Name Your Project and Select the Version “Python35” from drop-down if there are more than one.
- After you have successfully created a project, you will see something similar to this.
- Right Click on “MyFirstProject” and create a new Python Package.
- A python file named as “_init_.py” will be automatically created. Delete this file.
- Right Click on Project and create a new Python File. Give it name “HelloWorld.py”
- To print something on screen, “print” function is used. Copy and paste these lines of code to you editor.
print("Hello, This is my First Program in Python")
- Now, Run you program by pressing Alt+Shift+F10 or select “Run” from menu bar at the top.
- Select “HelloWorld.py” from the options if it prompts to select and Click Run.
- You will see the following output on your screen
- Use the following code to take input from user.
name = input("Enter your Name:")
print("Hello", name, ", have a Nice Day :)")
- Run the program and see the output.
We have successfully created and executed our first Python Program using PyCharm as an IDE. You are currently using Trial version of PyCharm. You can get a Licensed version for FREE from JetBrains Student Package. To grab this Read this tutorial that guides step by step how to register your PyCharm for FREE.
Stay with Protorials for more tutorials.
Have a nice day!