This is a continuation from part 1/2 https://coderlegion.com/1568/write-a-pseudocode-and-python-code-to-find-the-sum-of-numbers-divisible-by-4-part1
Table of Contents
E. Divisibility by four rules
1. The long division
2. The modulo operator %...
Pseudocode illustrates the procedure in natural language on how to achieve a goal. Pseudocode is important because it will allow us to see an overview of all tasks, recognize step by step how tasks are executed and the intent of each task. It is not ...
A. Introduction
This article is part 2 of the Basic Operators which examines Logical, Bitwise, Membership and Identity operators. This is a continuation of Part 1 which discusses Arithmetic, Comparison and Assignment operators.
Logical operators are...
A. Introduction
Operators, ranging from a simple addition to a more complex operations like bitwise and beyond, serve as indispensable tools in the hands of the programmers to manipulate data and achieve desired outcomes dictated by the code's objec...
A. Introduction
Variables are containers of values or data that allow the programmers to manipulate the value indirectly. Variable values can be changed, they can be useful for tracking the state of certain objects. By giving meaningful variable nami...
A. Introduction
Python syntax is the language grammar or structure of expressions or statements that are read by the Python parser before executing the full code. Python tokenizes the source code into keywords, operators, identifiers, etc to quickly ...
Updated on: 2023-10-29
The exception 1 or error message "TypeError: 'int' object is not iterable" tells us that we did something wrong — trying to iterate on an int or integer object. TypeError 2 is an exception, when an operation is applied to ...
Reading the contents of a file is one of the skills one has to learn to know more about the language. We read a file to search for a word, phrase, number, or some string pattern, reformat it, print what is on it, etc.
We can read all files in a dire...