Cover image for How To Code A Simple Hello World Program Using Python

How To Code A Simple Hello World Program Using Python

Profile image for Farooq Sheikh
Farooq Sheikh Full Stack Developer | Nodejs, mongodb, Reactjs
Dec 25, 2021 ‧ 2 min read
Series (1 Parts): Python Basics

In this article will discuss how to code a simple hello world program in Python. Python is a high-level programming language that is easy to use and can be learned in a short time. It’s also very powerful. If you’re not familiar with it yet, this article will help you get started. The best way to learn any new language is to write some code. 

What is Python? 

Python is a programming language that was created in 1991 by Guido van Rossum and is currently maintained by the Python Software Foundation. It is an interpreted language (i.e., it executes source code, as opposed to compiled code), dynamic language (i.e., it does not require the use of an intermediate representation, such as bytecode or Java-like class files) and object-oriented language (i.e. it features classes, objects and inheritance). 

The Python interpreter is built into the CPython reference implementation of Python. It is also available as a stand-alone interpreter called PyPy. The Python language is well suited for rapid development of web applications, data analysis, scientific research, system administration, game programming and more. Python is used as a scripting language for Web applications, and as an embedded scripting language in applications. The interpreter can be embedded in applications using the standard library modules and standard library API. 

Installing Python on windows 

Windows users can easily install Python by following these steps. 

  • Download Python from [here](https://www.python.org/downloads/) and save it to any directory on your computer. 
  • Open Command Prompt and type in the following command. You may need to press enter a few times to install the libraries needed. ``` python -m pip install -U nltk ```
  • Close Command Prompt and restart your browser.

Hello World!  

The world is a big place and we have a lot of things to do. But we must start somewhere. So let's use Python as the programming language for this example. 

We can think of Python as a "toolkit" language. You can use it to create a web application or build an AI system. You can even use it to automate tedious tasks. 

As you can see, this is not a copywriting platform. It's a programming platform. So we will need some code. Let's begin. 

Source Code 

#!Python#!/usr/bin/env python 

# A basic hello world program 

print("Hello, World!") 

# End of script 

Output 

Hello, world! 

In this program, the built-in print() function is used to print the string Hello, world! on our screen. 

By the way, a string is a sequence of characters. In Python, strings are enclosed inside single quotes, double quotes, or triple quotes. 

Posted on Dec 25, 2021 by:
Profile image for Farooq Sheikh
Farooq Sheikh
Full Stack Developer | Nodejs, mongodb, Reactjs
PythonJavaSpringCNode.jsReactjs +1

Comments

Profile image for Farooq Sheikh

Full Stack Developer | Nodejs, mongodb, Reactjs

PythonJavaSpringCNode.jsReactjs +1
2.4K
Reputation
199
Following
242
Followers