Introduction To Python on Digital Blackboard
/python/intropython/
Recent content in Introduction To Python on Digital Blackboard
Hugo  gohugo.io
enus
Copyright © 2022{year} Digital Blackboard. All Rights Reserved.
Sat, 04 Dec 2021 10:43:39 +0800

Functions
/python/intropython/6functions/
Tue, 12 Jul 2022 00:00:00 +0000
/python/intropython/6functions/
Table of Contents
Introduction
Defining Functions
Calling Functions
The sorted() Function
Lambda Functions
Namespace and Scope (optional)
Introduction
A function is a block of code that performs a specific task and only runs when it is called. Functions help break our program into smaller modular chunks. As our program grows larger with time, functions make it more organized and manageable. More importantly, a function is called only when there is a need and thus avoids repetition of the same chunk of code.

Data Types
/python/intropython/3datatypes/
Sun, 03 Jul 2022 00:00:00 +0000
/python/intropython/3datatypes/
Table of Contents
Data Types
Integers and Floatingpoint Numbers
Strings
String Methods
Mixing Strings and Variables
Indexing and Slicing Strings
Indexing Strings
Slicing Strings
Booleans
Comparison Operators
Logical Operators
Data Types
Variables can store data of different types, and different data types serve different purposes. Python has the following data types builtin by default, in these categories:
Category Data Types Text str Numeric int, float, complex Sequence list, tuple, range Mapping dict Set set, frozenset Boolean bool Binary bytes, bytearray, memoryview In this section, we will discuss the most important basic data types:

Python Objects
/python/intropython/2objects/
Sat, 02 Jul 2022 00:00:00 +0000
/python/intropython/2objects/
Table of Contents
Objects
Variables
Attributes and Methods
Objects
An important characteristic of the Python language is the consistency of its object model. Every number, string, data structure, function, class, module, etc. exists in the Python interpreter as a Python object. Each object has an associated type (e.g. string, integer or function) and internal data. In practice this makes the language very flexible, as even functions can be treated like any other object.

Simple Calculations
/python/intropython/1simplecalc/
Fri, 01 Jul 2022 00:00:00 +0000
/python/intropython/1simplecalc/
Table of Contents
Python as a Calculator
Order of Operations
Mathematical Functions
Python as a Calculator
Python contains functions found in any standard graphing calculator. An arithmetic operation is either addition, subtraction, multiplication, division, or powers between two numbers. An arithmetic operator is a symbol that Python reserves to mean one of the aforementioned arithmetic operations. These symbols are
+ for addition  for subtraction * for multiplication / for division ** for exponentiation.