22 April 2022

Debugging, Syntax error, Run-Time Error, computer program? and How Does It Work?

A quick and simple overview of  What is a Debugging, Syntax error, Run-Time Error, computer program and How Does It Work?

A quick and simple overview of what a computer program is. This is the introduction to what will become a whole series of lessons available at thetechtrain.co.uk teaching beginners how to program using Python.

Your computer obeying your every click is thanks to programs -- lots of them. Programs are what makes the digital world go round, facilitating many commands and tasks that we take for granted. Learn more about what a program is and how programs impact our lives. 

Put simply, programs are a set of orders that tell a computer what to do. This can be as simple as following a link or opening an application, or as complex as running a whole system. Programs are usually put in a storage area accessible to the computer. Once a computer receives and performs one instruction, it gets the next instruction.

A program can be interactive or batch. Interactive programs are ones in which users interact and facilitate commands, like a web browser. Batch programs are programs that are started by interactive users, but then continue to carry out program commands on their own. What kinds of programs do you use daily? How many commands do you think are involved in each program? Let us know what you think in the comments below, and don’t forget to hit the like button.

What is Debugging?

debugging is the procedure of identifying and removing errors from computer hardware or software. many times you may create a code to play a certain game or to run a mathematical operation but when you run the code you find out that the output result is not as expected.

practically you will not go ahead and delete the entire code that you worked on for so long but rather you will try to figure out what is wrong with it and try to fix it this procedure may take a while and multiple trials, until you are able to reach your desired goal to debug the correct way you need to start with deciding where exactly the problem is appearing, is it at the beginning of the code at the end or maybe somewhere in the middle being able to locate the problem makes a huge difference in debugging.

1) What is a Syntax Error? What does SYNTAX Error mean?

What is a syntax error in Python and why do syntax errors occur? Syntax errors in Python arise when Python fails to recognize a piece of code as a valid Python code! Unfortunately, syntax errors are typically regarded as the least specific type of error in Python and could force you to spend some time verifying that your interpreter is accepting each piece of code as a valid Python code. number.

This timeline is meant to help you understand syntax errors in Python:

  • Introduction, what is a syntax error in Python, and syntax definition.
  • Why do syntax errors in Python happen?
  • How to fix a syntax error in Python programming.
  • A final note about syntax errors in Python.

2) The Program Run-Time Errors 

in this video, we are going to see what runtime errors are errors that occur while executing the program running the program. 

these programs have got no syntax errors when you compile the program after writing it then it will not show any error but when you run the program then you will get the error you will get an error in the way that it might hang or it might say that the program cannot be executed.

why this happens because it might have gone into an infinite loop it might have by mistake done division by 0 or rather it has not done by mistake due to your programming error the division by 0 scenarios has occurred or a wrong value has been entered by a user.

3) The Semantic Errors

in this video, we are going to discuss Symantec errors and what semantic errors are logical errors. In the previous video, we discussed syntax errors when you don't follow the grammatical rules and regulations of the programming language that we are using those errors are called syntax errors.

However, you can make some logical errors also they will not be detected by the compiler like your grammatical errors these errors are called the semantic errors when you actually execute your program you will not get the answer as you had expected and then you will know that you have made some logical errors.

4) Experimental Debugging

You are confronted with clues, and you need to infer the processes and events that led to the results you see. Debugging is likewise like an experimental technology. Once you've got a concept approximately what is going incorrect, you regulate your software and attempt once more.

What is experimental debugging? Debugging is also like experimental technological know-how. Once you have a concept of what goes wrong, you adjust your software and strive again. If your speculation became accurate, then you may expect the end result of the modification, and you are taking a step closer to an operating program.