Catatan

Breaking

Wednesday, June 17, 2026

Tutorial 1: Python for Beginners: Installation to Your First Successful Program

 

What Is Python?

Python is a programming language that is easy to learn, has simple syntax, and is widely used for web development, task automation, data analysis, artificial intelligence (AI), and many other applications.

Python is an excellent choice for beginners because its code is easy to read and understand.


Step 1: Download Python

  1. Visit the official Python website:
    https://www.python.org

  2. Click Downloads.

  3. Download the latest Python version suitable for your operating system (Windows, Linux, or macOS).


Step 2: Install Python

After the installer has been downloaded:

  1. Run the Python installer.

  2. Check the option:

    Add Python to PATH

  3. Click Install Now.

  4. Wait for the installation process to finish.

  5. Click Close.


Step 3: Verify the Installation

On Windows

  1. Press Windows + R

  2. Type:

cmd
  1. Press Enter.

The Command Prompt window will appear.

Type:

python --version

or

python -V

If the installation is successful, you will see something similar to:

Python 3.14.0

The version number may differ depending on the installed version.


Step 4: Start Python

In Command Prompt, type:

python

If successful, you will see:

Python 3.14.0
>>>

The >>> prompt means Python is ready to accept commands.


First Example Program

Type:

print("Hello World")

Then press Enter.

Output:

Hello World

Explanation:

  • print() displays text on the screen.

  • The text inside quotation marks is displayed exactly as written.


Second Example: Simple Addition

Type:

print(10 + 5)

Press Enter.

Output:

15

Explanation:

Python calculates the mathematical expression inside the parentheses and displays the result.


Third Example: Using Variables

Type:

name = "John"
print(name)

Output:

John

Explanation:

  • name is called a variable.

  • Variables are used to store data.

  • The value of a variable can be displayed using print().


Exiting Python

To exit Python, type:

exit()

or press:

Ctrl + Z then Enter

(Windows)


Conclusion

If you successfully ran:

print("Hello World")

and

print(10 + 5)

then Python has been installed correctly and you are ready to learn more advanced topics such as:

  • Variables

  • Data Types

  • Operators

  • Conditional Statements (if)

  • Loops (for and while)

  • Functions

  • Lists and Dictionaries

  • Object-Oriented Programming (OOP)

Happy Python learning!





Baca versi Indonesia: Klik Di sini




No comments:

Post a Comment

Tutorial 3: What Should the Third Python Tutorial Be?

Tutorial 3: Your First Python Program How to Create Your First Python Program (Hello World and User Input) Topics Covered Opening the ...