At Westonci.ca, we provide clear, reliable answers to all your questions. Join our vibrant community and get the solutions you need. Experience the ease of finding reliable answers to your questions from a vast community of knowledgeable experts. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.

When writing code, how can printing be useful?

Sagot :

Answer:

See Explanation

Explanation:

Printing while writing code can be useful in several ways.

One of which is to determine the progress of your code. Many a times when you write a code and some parts of your codes are not working as expected, you can use the print statement to track where the program stopped working properly.

Take for instance, you write a program of 50 lines of code and you suspect that the program stops working at line 30, you can use the print statement to track this program.

Please note that: the statement to be printed is not specific but you should make use of something unique that you can easily spot.

E.g

print("It worked up till this point")