Let’s write your first code in Python. It’s so satisfying to see yourself coding and your code working and giving output.
So, let’s get started. Open your VS Code, on the screen you will likely see this interface.
This is a simple one line code in python. This code give output “Hello, world” in the terminal window.
Let’s demystify this simple code bit by bit.
Here ‘ print() ‘ is a built in functions in python library. ‘Hello, World!’ is text that you want as output. this can be any text like ‘This is my first program in Python’.
So what is a function?
A function in simple terms is something that takes input, processes it and gives back output. Kind of just like a machine, which does a specific task by taking input and gives a desired output. You may have learnt in math class about functions. It is a similar concept.
In the below example the grinder/juicer acts as a function which takes fruits as input, processes them (grinds them), and gives juice as output.
![]() |
| Fig: Function |
In the similar way ‘print()’ function takes input whatever is between the parentheses and gives back output. Usually if the text between the parentheses is enclosed with single, double or triple quotes it is called a String. A string will be printed as it is.
.png)





