while loop vs do-while loop

while Loop: This is a standard while loop because: The condition i < 5 is checked before each iteration. If i were greater than or equal to 5 from the start, the loop would not execute even once. do-while Loop: Python does not have a built-in do-while loop like some other programming languages (e.g., C, C++, or Java). However, you can mimic the behavior of a do-while loop using a while loop with a condition that ensures the loop executes at least once. ...

October 22, 2024 · 2 min · Lin Lin Hlaing

Introduction to Python

Python Born on February 20, 1991. An open source (free), high-level, object-oriented, interpreted and general-purpose dynamic programming language. Easiest to learn among programming languages! (But slow!) Gaining popularity over the past ten years, especially for ML and DL. Python version For machine learning, particularly neural network deep learning, it’s recommended to use Python 3.8 due to compatibility issues with TensorFlow in later Python versions. Many versions of TensorFlow work more reliably with Python 3.8, avoiding potential problems found in Python 3.9 or newer Applications of Python Website development Software and Mobile Apps development Scientific and numeric computing, etc. Python libraries NumPy - for numerical computation ...

October 21, 2024 · 2 min · Lin Lin Hlaing