Saturday, May 15, 2021

2-Hello Python

Hello World!

If you downloaded and installed Python software on your computer, it means you are ready to learn. 

Lets start to type codes and small programs.

First one is Hello world!

To display any text as message or information on the screen, you can just type the print function with the following signs and texts as below. 

print("Hello world!")

Then under this code, you will see the text as below.

Hello world!


Like the statement hello world for example, the print function is part of the basic Python language, whenever we use keywords or functions that are part of the language, we're using the programming language's syntax to tell the computer what to do. So what are functions and keywords?
πŸ‘‡πŸ‘‡πŸ‘‡Click Read more

Functions are pieces of code that perform a unit of work. We'll talk a lot more about functions later on, and you'll even learn how to write your own. Keywords are reserved words that are used to construct instructions. These words are the core part of the language and can only be used in specific ways. Some examples include if, while, and for.


The keywords and functions used in Python are what makes up the syntax of the language. notice how hello world is written between double quotation marks. Wrapping text in quotation marks indicates that the text is considered a string, which means it's text that will be manipulated by our script. In programming, any text that isn't inside quotation marks is considered part of the code.

No comments:

Post a Comment

Your comment will taken into consideration.