32
loading...
This website collects cookies to deliver better user experience
Hello, World!
seems to be the first line to code any programmer would run to test if the coding environment is properly set up. This culture has been a norm for both new and existing developers. As a new developer, or new to a language, you would definitely want your first program to be the famous “Hello, World!” program. print("Hello, World!")
print()
function is a built-in function (it comes installed with Python) that takes in a couple of arguments and prints it out to the console. The print()
function is one of the many built-in functions that come installed with python, and it is made available during execution.print()
function above.print('Hello, World!')
python
python
command before activating it. And also, the IDLE looks more aesthetically pleasing.Clarity: When you need to make reference to your code writing some time ago and you can’t remember what the program actually does. The comments that are written along with the program can give you a hint of what each function or statement does. This is particularly useful in complex and large programs containing a bunch of functions and packages. With the help of the comments, it will be easy to map out what the program does.
Reusability: The fact that you can still understand and remember what your code does after a long time doesn't mean everybody can. In a case where you are deploying a package to be used by other developers, they might get stuck at some point and attempt to check the codebase. Without proper comment or description of what each code does, it will be hard for the programmers to identify where the problem is thereby discouraging them from using the package any further.
OSS: Open Source Software (OSS) is software that anybody can modify because it is “Open” and publicly accessible to everyone. Python is an example of an OSS that anyone can contribute to. OSS is mostly developed by programmers all over the world. Because of this diversity, confusion might come up because the codebase is written by different sets of people in different locations and at different points in time. These people might not (or never get to) know each other. This problem is solved by proper documentation of a project. Adding comments to programs is a way of documenting a program for future reference. This is the reason why many robust open-source software like Python is still in existence today.