[PYTHON] Let's do "Hello World" in 40 languages! !!

Speaking of programming languages, there are 2500 high-level languages in the world. Programming languages have their own characteristics, but the basic logic is almost the same.

TIOBE is a well-known indicator of the popularity of programming languages. We update the ranking every month. The figure below is the latest data for April 2020. Overall, Java and C haven't changed in popularity over the decades.

April4

For programmers, it's mostly from Hello World when they start learning development languages. This article has implemented Hello World in 40 programming languages. Let's see what the differences are between each language.

  1. C
#include <stdio.h>
int main(void){
    printf("Hello, World!\n");
    return 0;
}
  1. C++
#include <iostream>
int main(){
   std::cout << "Hello, World!\n";
}
  1. C#
class HelloWorldApp
{
    static void Main()
    {
        System.Console.WriteLine("Hello, World!");
     }
}
  1. Objective-C
int main(int argc, const char * argv[]) {
    @autoreleasepool {
        NSLog(@"Hello, World!");
    }
    return 0;
}
  1. Java
public class HelloWorld
{
		public static void main(String[] args)
		{
        System.out.println("Hello, World!");
		}
}
  1. JavaScript
document.writeln('Hello, World!');
  1. TypeScript
console.log("Hello, World!");
  1. PHP
<?php
 echo "Hello, World!";
?>
  1. Python
print("Hello, World!")
  1. Kotlin
fun main() {
    println("Hello, World!")
}
  1. Swift
import Swift
print("Hello, World!")
  1. R
cat("Hello, World!")
  1. Rust
fn main() {
    println!("Hello, World!");
}
  1. Go Lang
package main 
func main() { 
    println("Hello, World!") 
} 
  1. Bash
echo 'Hello, world!'
  1. Perl
use strict; 
use warnings; 

print("Hello, World!"); 
  1. PowerShell
Write-Host 'Hello, World!'
  1. Ruby
puts "Hello, World!"
  1. SQL
SELECT 'Hello, World!';
  1. PL/SQL
DECLARE  
  
BEGIN  
    SYS.DBMS_OUTPUT.PUT_LINE('Hello, World!');  
END; 
  1. Apex
System.debug( 'Hello, World!' );
  1. Groovy
println "Hello, World!"
  1. Scala
object dev
{
    // Main Method 
    def main(args: Array[String]) 
    {
        // prints Hello World
        println("Hello, World!") 
    }
}
  1. MATLAB
disp('Hello, World!');
  1. Lua
print("Hello, World!")
  1. Haskell
putStrLn "Hello, World!"
  1. Julia
println("Hello, World!")
  1. Dart
void main() {
  print('Hello, World!');
}
  1. Elixir
IO.puts("Hello, World!")
  1. Ada
with Ada.Text_IO;
procedure Hello is
begin
   Ada.Text_IO.Put_Line("Hello, world!");
end Hello;
  1. Bosque
namespace NSMain;  
entrypoint  
function main(): String {  
 return "Hello, world!";  
}  
  1. D
import std.stdio;
void main()
{
    writeln("Hello, World!");
}
  1. F#
printfn "Hello, World!"
  1. COBOL
display "Hello, world!".
  1. BASIC
PRINT "Hello, World!"
  1. Visual Basic
Imports System

Module Program
	Sub Main(args As String())
		Console.WriteLine("Hello, World!")
	End Sub
End Module
  1. Pascal
program hello;
begin
    writeln( 'Hello, World!' );
end.
  1. Lisp(CLisp)
(print "Hello World!")
  1. Fortran
program hello
  print *, 'Hello, World!'
end program hello

40. Assembler

section     .text
global      _start

_start:           

    mov     edx,len
    mov     ecx,msg
    mov     ebx,1  
    mov     eax,4  
    int     0x80   

    mov     eax,1  
    int     0x80   

section     .data

msg     db  'Hello, World!',0xa
len     equ $ - msg

Recommended Posts

Let's do "Hello World" in 40 languages! !!
Programming language in "Hello World"
Hello World in GO language
cout << "Hello, World! \ N" in python
Hello World in Flask [Appropriate memo]
Code: 2 "Hello World" in "Choregraphe-Python script"
Hello world
Hello World in various languages [Python / PHP / Java / Perl / Ruby]
Hello world instead of localhost in Django
How to display Hello world in python
Pymacs hello world
cython hello world
Hello World with gRPC / go in Docker environment
web2py memo: Hello World
hello world with ctypes
RabbitMQ Tutorial 1 ("Hello World!")
Let's do Raspberry Pi?
HMAC in various languages
Hello, World with Docker
Hello World on Django
Django's first Hello World
Hello world with flask
Hello World! Output list by various languages (scheduled to be updated in a timely manner)
Display "Hello World" created in the local environment on the web
python / tensorflow beginners build jupyter + tensorflow environment and do Hello World
Draw hello world with mod_wsgi
Hello World with Flask + Hamlish
Until hello world with zappa
Let's do R-CNN with Sklearn-theano
Hello World (beginners) on Django
Python starting with Hello world!
Let's find pi in Python
Getting Started with Heroku-Viewing Hello World in Python Django with Raspberry PI 3
Hit the echo command in the Mac terminal to output Hello World
Python beginners tried Hello World in 30 seconds using the micro-framework Flask
What automation should I do in RPA, VBA, and programming languages?