"Hello World" - print() function
In this tutorial, we will get to know some of the basic syntax of Python.
Now that you've got an idea of what a computer program looks like. We're going to use the Python interpreter to make our computer say hello to the world, by running this line of code in the code interpreter:
When we run this code, the words "Hello World" appear on the screen. It's because print( ) is a Python function that writes what we tell it to on the screen.
The print function is part of the basic Python syntax. Basic Python syntax consists of keywords and functions. Using the Python syntax is also equal to telling the computer what to do.
Whenever we use keywords or functions that are part of the language, we're using its syntax to tell the computer what to do.
So what are functions and keywords?
Last off, notice how "Hello World" is written between " " marks. Wrapping text in quotation marks (either double or single quotes) indicates that the text is considered a string, which means that text that will be manipulated by our script. String is one of the data type in Python, we will dig deeper into string and other data types in the next tutorials.
All right, now that we've written our first piece of Python code, I think you're ready for something a bit more challenging than "Hello World"
Up next, we'll dive deeper into some basic building blocks of Python syntax, things like variables, expressions, functions, and conditional blocks.
The tips to learn a programing language is to consider it as learning a spoken language.
Wow! That sounds like a lot to learn. But don’t worry. The tips to learn a programing language is to consider it as learning a spoken language.
For example, the best way to learn Spanish is to visit a Spanish speaking country, immerse yourself in the culture, listen to the people. Then figure out how to arrange the words to form a sentence that another speaker can understand. The same is true for programming. When you immerse yourself in Python programming you'll learn how to formulate statements of code that the computer can understand.
Again, if at any point you feel confused or that something just isn't clear, remember you can watch the tutorials over and over. And the most important thing is don't forget to utilize these exclusive supports (Eg. 1:1 Live QnA, Accountable Buddy Groups, etc) that can help your learning journey easier!
We just sent you an email. Please click the link in the email to confirm your subscription!