First Python Project in PyCharm IDE
Creating Python Project in PyCharm
1. Click “Create New Project” in the PyCharm welcome screen.![Create New Project PyCharm Welcome Screen](https://beginnersbook.com/wp-content/uploads/2018/01/Create_New_Project_PyCharm_Welcome_Screen-1024x741.jpg)
2. Give a meaningful project name.
![Python Project Name PyCharm](https://beginnersbook.com/wp-content/uploads/2018/01/Python_Project_Name-1024x741.jpg)
Writing and running your first Python Program
1. Now that we have created a Python project, it’s time to create a Python program file to write and run our first Python program. To create a file, right click on the folder name > New > Python File (as shown in the screenshot). Give the file name as “HelloWorld” and click ok.![First Python File in Project](https://beginnersbook.com/wp-content/uploads/2018/01/First_Python_File_in_Project-1024x491.jpg)
# This Python program prints Hello World on screen print('Hello World')
![Hello World Python Program PyCharm](https://beginnersbook.com/wp-content/uploads/2018/01/Hello_World_Python_Program_PyCharm-1024x445.jpg)
3. Lets run the code. Right click on the HelloWorld.py file (or the name you have given while creating Python file) in the left sidebar and click on ‘Run HelloWorld’.
![Run the first python program](https://beginnersbook.com/wp-content/uploads/2018/01/run_the_first_python_program-1024x452.jpg)
4. You can see the output of the program at the bottom of the screen.
![Output of the First program in PyCharm](https://beginnersbook.com/wp-content/uploads/2018/01/Output_of_the_First_program_in_PyCharm-1024x610.jpg)
No comments:
Post a Comment
Your feedback is highly appreciated and will help us to improve our content.