At our first program, we’ll create a simple Python program like this: We’ll send a code to the computer and ask it to calculate something and display the solution on the screen as an output.
As you remember in last lectures, Python syntax works similar to language grammar.
For Example:
“Give me the book”. When you say this to a friend, your friend will give the book. Why? Because in the sentence, you explain the action with the verb: “give”, and the subject with “the book”. And similar to the language grammar, we will write the code in a rule called syntax in Python.
We want it to calculate 2+2 and display the result on the screen as an output.
So, we will write that “print(2+2)” in IDE. “Print” means “write it on the screen”. You can think it like a verb in language grammar. And what will it write on the screen? “the solution of 2+2”. How? By specifying it in parentheses. (2+2), the other syntax rule.
In Python Programming, we can call action verbs like “print” as an “function”. There can be thousands of functions in python, to specify actions in syntax, for example; print, delete, read, summation etc.
If you have any questions about this topic, please don’t hesitate to ask in the comments. I will answer all your questions.