Python for Beginners #10 – Integers & Floats in Python | int vs float
Python VIBE Programing
0:00 / 0:00
Python for Beginners #10 – Integers & Floats in Python | int vs float
32 просмотра · 4 дня назад
Python VIBE Programing
10 подписчиков
32 просмотра · 4 дня назад
Welcome to Video #10 of our Python for Beginners course! 🐍
In the previous video, we learned about strings (`str`) and how Python represents text.
In this video, we'll continue learning about Python data types and focus on two important types used for numbers: **integers (`int`) and floats (`float`)**.
You will learn:
• What an integer (`int`) is
• What a float (`float`) is
• The difference between whole numbers and decimal numbers
• How to create integer and float variables
• How positive and negative numbers work
• How to use `type()` to check a number's data type
• The difference between `25` and `"25"`
• How Python treats numbers differently from strings
We'll also practice these concepts in Visual Studio Code with examples like:
age = 25
students = 30
price = 19.99
height = 1.80
By the end of this lesson, you'll understand the difference between strings, integers, and floats and how to identify them in Python.
Quick summary:
"Alex" → str
25 → int
19.99 → float
⏱️ Timestamp
00:00 Introduction
00:23 What Is an Integer (int)?
01:05 What Is a Float (float)?
01:37 Integer Examples in VS Code
02:38 Checking Integers with type()
05:40 Float Examples in VS Code
07:02 1.8 vs "1.80"
08:26 Practice Exercise
08:53 Quick Summary
09:59 Next: Boolean
In the next video, we'll learn about another important Python data type: **Boolean (`bool`)**, which allows us to work with `True` and `False` values.
If you enjoyed this video, make sure to like the video and subscribe to the channel so you don't miss the next lessons in this course! 🐍
Thanks for watching, and I'll see you in the next video!
#Python #PythonForBeginners #PythonDataTypes #PythonTutorial #LearnPython