#5 Numbers & Typecasting in python | Python Tutorial
Key Takeaways
Explains numbers and typecasting in Python for beginners
Full Transcript
hello everyone welcome back to my channel code for kids so today we are going to learn about the casting in python so first thing what is casting and why we are using the casting okay so casting means we have to convert from one data type to another so this is called as casting okay so now let's see with the help of your example so even you can access our playlist in the python so you will get all the thing from the basic okay so how we will start our casting so first we will take one example suppose in the x variable we have y so it means x is the integer right now if you will print x so what will happen you will get output i sub y so you need to just click on this play button if you want to run the project after that if you want to convert this one into the floor okay what you can do you need to just write load y okay x equals to float 1 so what will happen now if i will run so you will get 1.0 it means this one is the float value but now what next what we can do here you need to just take one variable suppose x equals 2 now you have 1.5 it means this is your float value this is your decimal value okay now you need to just click on print you need to just type print x so what you will say you will get 1.5 and this is your decimal value so you need see after that if you want to convert this 1.5 into integer so you need to just write in you can write 1.5 now what will happen if you will run this program you will get only one so what will happen point five per discard five because this is one point five is the floor okay now we are converting that float into the integer okay after that we will see the next example suppose x equals to we have one string like uh suppose one now what will happen if you will write print x so once you will play this you will get one okay but if you want to convert this into the integer even you can do that in suppose one now see what will happen so you will get one so in this way you can convert anything whatever you want okay after that suppose if you have any data type like suppose we have the variable y equals to if you will take float 4.5 okay after that you want to print this print file so now see what will happen if i will run this program you will get 4.5 but here if i will write in so what will happen you will get only 4 why because see this 4.5 is the value but for that what we have a data type we have integer so this will convert 4.5 into your integer value so here you will get only 4. so in this way you can perform our casting in python okay so please like share and subscribe our channel and press the bell icon if you want more latest update so after that in the next video we will see one more concept so thank you so much
Original Description
In this Python tutorial I will show you what numbers are and how to convert one type of python object into another.
This video is a part of my python for absolute beginners playlist -
https://youtu.be/NJi6OPO5lY8
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Code For Kids · Code For Kids · 40 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
▶
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#Scratch Tutorial 1 | How to create your own Scratch account #codeforkids #scratch #Game Development
Code For Kids
#Scratch Tutorial 2 ||How to enable Share Button option in Scratch #codeforkids #scratch #game
Code For Kids
Fish Moving inside an Ocean 🌊🌊 #codeforkids #scratch 🥰
Code For Kids
Scratch Programming | Fish Aquarium game | #codeforkids #scratch #game
Code For Kids
Draw the circle in scratch#codeforkids #scratch #game
Code For Kids
Draw Circles in Scratch || How do you draw shapes on Scratch? #codeforkids #scratch #game #coding
Code For Kids
How to Make a Dino Jump Game in Scratch | Tutorial #codeforkids #scratch #game
Code For Kids
Scratch Tutorial || How to Make a Catch Game in Scratch.|| Scratch Tutorial for absolute beginer
Code For Kids
Scratch Tutorial || Day 1
Code For Kids
Scratch Tutorial || Day 2 (DJ System , Dance and Story writing)
Code For Kids
How to Make A Maze Game in Scratch 3.0 | Scratch 3.0 Tutorial |Scratch Tutorial for begineer
Code For Kids
Scratch Tutorial || Day 3
Code For Kids
Scratch Tutorial || Day 4
Code For Kids
Scratch Tutorial | Cat And Mouse Game | Scratch Tutorial for Beginner
Code For Kids
Scratch Tutorial || Day 5
Code For Kids
how to make dress up game on scratch || Scratch Tutorial for Beginner
Code For Kids
How to Make a Pong Game in Scratch || Scratch Tutorial for Beginner
Code For Kids
Scratch Tutorial || Day 6(part 1)
Code For Kids
Scratch Tutorial || Day 6( Part 2)
Code For Kids
Scratch Tutorial || Day 7
Code For Kids
Scratch Tutorial || Day 8
Code For Kids
How to Make Piano Game || Learn to Use Music Extension || Scratch Tutorial || Day 8
Code For Kids
How to Make Piano Game || Learn to Use Music Extension ||Scratch Tutorial for beginner
Code For Kids
Scratch Tutorial || Day 9
Code For Kids
Scratch Tutorial || Draw Shapes #shorts #codeforkids #youtubeshorts
Code For Kids
Scratch Tutorial |How to Draw Shapes in Scratch #scratch #scratchtutorials #codeforkids
Code For Kids
Day 10|| Scratch Tutorial
Code For Kids
Scratch Tutorial || Archery Tutorial
Code For Kids
#1 || Thunkable Beginner Tutorial Platform Overview
Code For Kids
App Development ||Tutorial 2 || how to add button in Thunkable || Thunkable for beginner #codeforkid
Code For Kids
App Development || Tutorial 3|| Beginner Tip "Change screens with a button click" in Thunkable
Code For Kids
Scratch Tutorial ||
Code For Kids
Thunkable Tutorial || Using Camera and Image Recognition components with Thunkable
Code For Kids
Build a Translator App with Thunkable ||Thunkable App Development || Tutorial 5||
Code For Kids
Thunkable Beginner Tutorial #6 || Web Viewer|| Redirecting App
Code For Kids
#1 World in Python || Python Tutorial || Python Programming || Google Colab
Code For Kids
#2 Python Tutorial for Beginners | User input in Python | Command Line Input | Python Variable
Code For Kids
#3 Python Comments | How To Write Comments In Python | Python Tutorial For Beginners |
Code For Kids
#4 Python Tutorial for Beginners | Data Types in Python
Code For Kids
#5 Numbers & Typecasting in python | Python Tutorial
Code For Kids
#6 Strings Tutorial | How To Use Strings In Python | Python Tutorial | Python Training |
Code For Kids
#7 Slicing And Other Functions In Python | Python Tutorials For Absolute Beginners.
Code For Kids
#8 Boolean in Python | Python Tutorial for Begniner
Code For Kids
#9 Python Tutorial for Beginners | Operators in Python
Code For Kids
#10 Lists And List Functions | Python Tutorials For Absolute Beginners
Code For Kids
#11 Tuple in Python | Python Tutorial
Code For Kids
#12 In Python | Python Sets Tutorial | Python Tutorial for Beginners | #python #pythonprogramming
Code For Kids
#13 If Elif Else Statement in Python || Python Tutorial for Beginners |
Code For Kids
#14 While Loop in Python ||Python Tutorial for Beginners
Code For Kids
Python Tutorial for addition of 2 numbers #shorts #youtubeshorts #codeforkids #pythonprogramming
Code For Kids
Python Tutorial for absolute Beginner|| While loop #pythonprogramming #shorts #youtubeshorts
Code For Kids
Machine learning for the kids with Scratch || Machine Learning for kids ||Day 1
Code For Kids
# Tutorial 1 || Machine Learning for kids | Image Classification example | Girl and boy
Code For Kids
#15 For loop in Python || Python Tutorial for Beginner
Code For Kids
# Tutorial 2 || Machine Learning for kids | Smart Home Automation | Turn On the Fan
Code For Kids
#Tutorial 3 || Snapchat Filter in Machine Learning|| Machine Learning for the kids ||
Code For Kids
#Tutorial 4 || Image Identification || Machine Learning for the kids|| Tiger , Elephant, boy
Code For Kids
Scratch Tutorial || Apple Catcher Game || Fruit Catcher|| catch game in Scratch
Code For Kids
Scratch Tutorial || How to record audio in Scratch || Scratch Tutorial for beginner ||
Code For Kids
Scratch Tutorial || how to translate language in scratch || Scratch tutorial for beginner
Code For Kids
More on: Python for Data
View skill →Related Reads
📰
📰
📰
📰
Why AI Makes Legacy Modernization More Feasible But Not More Automatic
Forbes Innovation
AI Stack Online Training | New Batch Starts Soon!
Medium · Python
I Started Tracking How Much Time I Spent Correcting AI Output. The Number Changed Everything.
Dev.to · Avery
The Top 5 AI Tools You Can Use Every Day to Save Hours
Medium · ChatGPT
🎓
Tutor Explanation
DeepCamp AI