Page cover image

Hello world!

Your first line of python code

In the programming world, a new language always uses hello world for testing, so today we will use python to test hello world.

>>> print('hello world')
hello world

We know that python is a scripting language. The code that outputs Hello World can be run directly on the interactive interface and the results can be given directly. Isn’t it very convenient? Let's take a look at how other languages need to be able to output Hello World!

The following is the programming method of Hello World in java

public class HelloWorld 
{
    public static void main(String[] args) 
    {
        System.out.println("hello world");
    }
}

The following is the programming method of Hello World in C++

#include <iostream>

int main() 
{
    std::cout << "hello world" << endl;
    return 0;
}

The following is the programming method of Hello World in C

#include <stdio.h>

int main() 
{
    printf("hello world");
    return 0;
}

After comparison, you will find the simplicity of python. In the next chapter, we will continue to explore the python method of Hello World.

Statistics

Start time of this page: December 17, 2021

Completion time of this page: December 17, 2021

Last updated