X Tutup
Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 858 Bytes

File metadata and controls

31 lines (20 loc) · 858 Bytes

Test

Hello, World!

Tutorial

Python has a very straightforward syntax. It encourages programmers to program without boilerplate (prepared) code. The simplest directive in Python is the "print" directive - it simply prints out a line (and also includes a newline, unlike in C).

The Python 2.X versions and Python 3.X version actually differ - in Python 2.X, the "print" command is not a function, and therefore it is invoked without parentheses. However, in Python 3.X, it is a function.

This tutorial uses Python 2.X, which allows you to print a line without parentheses.

To print a line, simply write:

print "This line will be printed."

Exercise

Use the "print" command to print the line "Hello, World!".

Tutorial Code

print "Goodbye, World!"

Expected Output

Hello, World!
X Tutup