Hello World Program in Python
What is Python?
Python is a very powerful programming language and can be used to write any piece of software. But you can also use it to do data science. Model your sales data, to text mining on your latest Twitter feeds, or build the next movie recommendation engine. It's all possible with Python. Python is open source, and there's a bunch of programmers across the world that have written amazing extensions to Python, to help you achieve great things.
Python can be used in the cases where the legacy analytical tools fail.
Before we start to learn the python program following is a list of some commands which can we will be mostly using while working with python:
For Linux / Mac
- pwd: prints present working directory (folder) of the terminal
- cd: It is used to change the directory (folder) from the terminal
- cd... : used to go one directory back
- cd<directory name >: used to go to child directory from the parent directory
- ls: to print all the folders in the current folder
- mkdir: to create a folder in the current directory
Terminal commands for windows
- cd: prints present working directory (folder) of the terminal
- cd: It is used to change the directory (folder) from the terminal
- cd... : used to go one directory back
- cd<directory name >: used to go to child directory from the parent directory
- Is: to print all the folders in the current folder
- dir: to create a folder in the current directory
Python Commands
- To run a python file:
- Go to terminal and navigate to the directory
- Run python filename.py
- To run jupyter notebook
- Go to terminal and navigate to the directory
- Run jupyter notebook
- To install a package
- Go to terminal and run
- Pip install package-name OR
- Conda install –c channel-name package-name
Writing a Hello World Program in Python
print("Hello World")
python <your file name>
Comments
Post a Comment