Learn Basic Python about Looping, Break, Continue, And how to Handling Error
- Get the insight about For and While Looping in the Python
- Get the insight about Break and Continue in the Python
- To gain new knowledge about Pass
- To gain new knowledge about the application of List Comprehension
- Get the insight about Syntax Errors and Exceptions
- Get the new insight about how to Handling Error in the Python
- Python is a case sensitive programming language, so the writing of the syntax must be considered
- Knowing more about for and while looping in the Python and realize the difference syntax with other programming languages
- Knowing more about break and continue
- Knowing the function of pass in python
- Knowing the application of list comprehension
- Understanding syntax errors and exceptions in Python
- Knowing how to handling error in the Python
- As a basic material for learning Python language for beginners
- As additional knowledge about looping, syntax errors and exceptions, handling error, and list comprehension in the Python
- The for loop is used to iterate over a sequence such as a list, string, tuple, other iterable objects such as range.
- A nesting loop means to loop over a sequence of sequences (a for loop inside another for a the loop).
- While loop is basically used to know how many iterations are required, can execute a set of statements as long as a certain condition is true.
- When the condition becomes false, program control passes to the line immediately following the loop.
- The break statement is used to terminate (stop) the loop, when a condition is met.
- Use the break keyword with if statement to stop and exit the loop.
- The continue statement means skipping the current iteration of a loop and continuing (immediately jumps) with the next iteration.
- Use the continue keyword to skip a block in a loop the current iteration.
- The pass statement is used as a code block material, to fill an empty code block.
- The pass used to be a statement or block of statements (statements), but did nothing to continue execution in order.
- List comprehensions are an easy way to define and create lists in Python.
- List comprehension is very useful if the list members we want to create are quite a lot.
- Syntax error is an error caused by not following the proper structure (syntax) of the language in Python.
- Syntax errors usually occur when we are just starting to learn Python
- Exception is the error that occur while the process is in progress
- Exceptions will be fatal if not handled
- Handling error to resolve the error so as not to stop the program
- Many types and ways to solve errors