Python Fundamental Datatypes str, int, float and bool (JupyterLab IDE)

  Рет қаралды 46

Philip Yip

Philip Yip

Жыл бұрын

This video gives an introduction to the Python Programming Language and examines the use of the fundamental datatypes which are used to input text data (str) and numeric data (int, bool and float) respectively. I cover the basics of Python syntax such as variable naming, use of the assignment operator and the concept of referencing a variable or function versus calling a function. This tutorial also uses the JupyterLab IDE and covers basic usage of the IDE such as looking up function docstrings.
The written tutorial for this guide is available on GitHub:
github.com/PhilipYip1988/pyth...
This video covers the concept of creating instances for each class, where each instance has associated instance data. I explore the use of class identifiers. Identifiers are normally methods (functions which operate on the instance data) or attributes (instance variables or properties that can be accessed that are essentially nested objects). The str methods are typically configured to operate on text data, while the int methods are typically configured to work on numeric data. I look at the concept of casting an int to a str or vice-versa.
In addition I look at the directory of each class and explore the use of the hidden datamodel identifiers which sadly are typically brushed over in most beginner tutorials. The hidden datamodel identifiers are not typically used directly but are mapped to inbuilt Python functions or operators. That being said it is useful to acknowledge them early on to get a feeling for Pythons syntax and build a fundamental understanding of object-orientated programming which will help later on as you advance in Python proficiency. Understanding datamodel methods early on prevents confusion when it comes to using the + operator. The + operator behaves differently for the str class and int class and is mapped to a differently defined _add_ datamodel method for each class which is setup for concatenation and numeric addition respectively. Datamodel methods are also known as double underscore identifiers or dunder identifiers colloquially.
#Python #datamodel #datatypes

Пікірлер
Learn MicroPython part 4 - Object Oriented Programming in MicroPython
1:30:56
Cat Corn?! 🙀 #cat #cute #catlover
00:54
Stocat
Рет қаралды 14 МЛН
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 38 МЛН
DO YOU HAVE FRIENDS LIKE THIS?
00:17
dednahype
Рет қаралды 101 МЛН
Generics: The most intimidating TypeScript feature
18:19
Matt Pocock
Рет қаралды 167 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 386 М.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 614 М.
Python Builtins: The Unicode String
2:59:45
Philip Yip
Рет қаралды 107
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 337 М.
Solving real world data science tasks with Python Pandas!
1:26:07
Keith Galli
Рет қаралды 1,5 МЛН
Tech Gadgets I’ve Bought-And LOVED!
21:41
Snazzy Labs
Рет қаралды 20 М.
Make YOUR OWN Programming Language - EP 1 - Lexer
15:56
CodePulse
Рет қаралды 471 М.
PART 52 || DIY Wireless Switch forElectronic Lights - Easy Guide!
1:01
HUBAB__OFFICIAL
Рет қаралды 48 МЛН
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 449 М.
Я УКРАЛ ТЕЛЕФОН В МИЛАНЕ
9:18
Игорь Линк
Рет қаралды 114 М.