Programming With the Python Programming Language - Sayem Tutorial

    Social Items

 

Programming With the Python Programming Language

A program is an instruction to tell the computer how to do a task. Meanwhile, a programming language is a language that we can use to create a program.

In this article, we will use the Python programming language to provide instructions to the computer. For example, when we click the Play button on the Media Player, the music/video will play. Behind that, the program works to tell the computer to play the media when the button is clicked.

Writing Programs With Python

Let's start writing a program that displays the text "Hello Everyone" on the screen. How to? Let us discuss this.

To tell the computer how to display something on the screen, we can use the print statement, for example:


print()
The statement above is a built-in function in Python to display something on the screen. The built-in function is, of course, predefined and of course, we can use it right away.

Everything that we want to appear on the screen must be written between parentheses and double quotes ("..."). So, to display the text "Hello Everyone", we could write it like this:

print("Hello Brother")
The result will be as follows:
Hello Brother

Easy isn't it?

Comments on Python
Comments are pieces of text that the Python Interpreter will ignore - which is usually used to make code or source code easier for others to read and understand.

Python supports the comments of the line (Single Line Comments). This means that the written comment includes only one line of text.


Everything after the hash mark # is a Single Line Comment. Example:
# Test python comment

Conclusion

Here, we already know that:
  • A program is a set of instructions for a computer.
  • The print() function can be used to display something on the screen.
  • Anything that will appear on the screen, must be written between brackets and quotation marks ("...").
  • print() is a Built-In Function in Python.
  • The hashtag # can be used to write comments in Python.
Maybe that's just my explanation, if anything is unclear, you can ask via the comments column below. If this article is useful, please share it. Thank you for visiting the education website.

Programming With the Python Programming Language

 

Programming With the Python Programming Language

A program is an instruction to tell the computer how to do a task. Meanwhile, a programming language is a language that we can use to create a program.

In this article, we will use the Python programming language to provide instructions to the computer. For example, when we click the Play button on the Media Player, the music/video will play. Behind that, the program works to tell the computer to play the media when the button is clicked.

Writing Programs With Python

Let's start writing a program that displays the text "Hello Everyone" on the screen. How to? Let us discuss this.

To tell the computer how to display something on the screen, we can use the print statement, for example:


print()
The statement above is a built-in function in Python to display something on the screen. The built-in function is, of course, predefined and of course, we can use it right away.

Everything that we want to appear on the screen must be written between parentheses and double quotes ("..."). So, to display the text "Hello Everyone", we could write it like this:

print("Hello Brother")
The result will be as follows:
Hello Brother

Easy isn't it?

Comments on Python
Comments are pieces of text that the Python Interpreter will ignore - which is usually used to make code or source code easier for others to read and understand.

Python supports the comments of the line (Single Line Comments). This means that the written comment includes only one line of text.


Everything after the hash mark # is a Single Line Comment. Example:
# Test python comment

Conclusion

Here, we already know that:
  • A program is a set of instructions for a computer.
  • The print() function can be used to display something on the screen.
  • Anything that will appear on the screen, must be written between brackets and quotation marks ("...").
  • print() is a Built-In Function in Python.
  • The hashtag # can be used to write comments in Python.
Maybe that's just my explanation, if anything is unclear, you can ask via the comments column below. If this article is useful, please share it. Thank you for visiting the education website.
Load Comments

Notifications

Disqus Logo