# Python Tutorial for Beginners 3: Integers and Floats – Working with Numeric Data

///Python Tutorial for Beginners 3: Integers and Floats – Working with Numeric Data

## Python Tutorial for Beginners 3: Integers and Floats – Working with Numeric Data

In this Python Beginner Tutorial, we will begin learning about integers and floats. Integers and Floats allow us to work with numeric data in Python. We will be learning how to perform basic arithmetic, as well as how to compare numeric values. Let’s get started.

The code from this video can be found at:

Watch the full Python Beginner Series here:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Instagram –

#Python

source

By |2019-10-23T23:32:41+00:00October 23rd, 2019|Python Video Tutorials|47 Comments

1. soltane loudhabachi October 23, 2019 at 11:32 pm - Reply

plz can you tell me which developing environment do you use in this video, and was is the shortcut that you use to run the program
thanks and ur video is rlly cool

2. Yoshita Gupta October 23, 2019 at 11:32 pm - Reply

awesome teaching style..from basic to advanced..thank you corey..u r doing a great work!

3. Natural Resources October 23, 2019 at 11:32 pm - Reply

Thanks

4. Subhas Nandy October 23, 2019 at 11:32 pm - Reply

In case a string value is inserted as 'abcd' and then we try to typecast it to integer, Python returns an error. Can't the characters of the string be typecasted to their ASCII values individually ?

5. V For Vendetta October 23, 2019 at 11:32 pm - Reply

A learning python without Corey Schafer is a learning not worth having.
V For Vendetta

6. karthik yatish October 23, 2019 at 11:32 pm - Reply

Very nice and very nicely explained and easy to understand quickly thank you !!¡!!!!!!¡

7. ya boi October 23, 2019 at 11:32 pm - Reply

You can also add string values as integers without converting the variables themselves if you need those variables as strings elsewhere. To add them as numbers you'd just type print(int(num_1 + num_2))

8. Maha for Marathis October 23, 2019 at 11:32 pm - Reply

Hi is that rounding up to digits not available in ver 2.5?

9. Issac Wiggins October 23, 2019 at 11:32 pm - Reply

Hey Corey, just thought I would let you know that you are known in the Information Technology forums in University of Phoenix I have spread your name as a credible source for learning Python. I hope you get many new followers for it.

10. 정Alex October 23, 2019 at 11:32 pm - Reply

If I was rich I would contribute a lot to that channel. but all I can do now is to subscribe and to like the video. thank you, Corey.

11. vuong hoang October 23, 2019 at 11:32 pm - Reply

Guys I encountered a problem when doing the comparisions in an interpreter, whenever I happen to do it the system doesn't give me the statement true or false
so for example:
num_1 = 16
num_2 = 17
print (num_1 > num_2)
=> I clicked run and it showed 16.25 (This is kinda off-topic, it was supposed to demonstrate true or false)

12. Shahid Nasim October 23, 2019 at 11:32 pm - Reply

u said 1:44 that u dont want want to drop the decimal it will be if do want to drop the decimal thats why we use integer or floor dision

13. Simge Naz Yıldız October 23, 2019 at 11:32 pm - Reply

I was trying to find a good course for Python, this is just super satisfactory. Awesome you are!

14. Dhart572 October 23, 2019 at 11:32 pm - Reply

Like it, but it’s hard to see.

15. Anie Ithil October 23, 2019 at 11:32 pm - Reply

Hello Corey, My python version is 3.7 and when I check it on the terminal it also confirms but still when I type print(3/2) out is 1 or the f strings were not recognized at the prev. video. Do you have any suggestions to fix the problem?

Thanks a lot for the videos you've been posting, the contents are very clear and useful. Keep going 🙂

16. Rowan October 23, 2019 at 11:32 pm - Reply

I struggle to see how you can use these in a real life python programme. I understand the concepts but not sure why for example you’d want to get the abs

17. illuminae __ October 23, 2019 at 11:32 pm - Reply

damn python is really similar to lua but with more built in functions

18. Harsh Modi October 23, 2019 at 11:32 pm - Reply

Its best on earth in the free/paid category

19. Garry Beck October 23, 2019 at 11:32 pm - Reply

Thanks Corey.

20. tsx October 23, 2019 at 11:32 pm - Reply

Did anyone get a actual job from online lessons including this one?, on the other note is there more intermediate lessons for python?

21. YoungFlexer _69 October 23, 2019 at 11:32 pm - Reply

22. YoungFlexer _69 October 23, 2019 at 11:32 pm - Reply

od random.random?

23. RahulByte October 23, 2019 at 11:32 pm - Reply

how to take type double input from the user ??

24. Mohammed Albanna October 23, 2019 at 11:32 pm - Reply

why do you press print in front of everything when u can do it without?

25. Niek Tuytel October 23, 2019 at 11:32 pm - Reply

hahawho end it all the way?

26. Xayrix October 23, 2019 at 11:32 pm - Reply

software name his using?

27. cameron October 23, 2019 at 11:32 pm - Reply

can somebody please tell me what ide is being used in the video?

28. Seán Earnest October 23, 2019 at 11:32 pm - Reply

I am really enjoying the sequential presentation of concepts in these tutorials. Not sure why this isn't the established curriculum for other popular courses available online. I have been so frustrated lately, having to migrate from course to course to fill in the gaps. It is understandable that no two courses are alike and that many have the stated objective of rapidly immersing the student in pragmatic exercises that are teachable, but from a strictly pedagogical standpoint, Corey appears to have struck gold here.

29. Emre Uğur October 23, 2019 at 11:32 pm - Reply

How do i reach specific digits of the number

30. Dash Diugh October 23, 2019 at 11:32 pm - Reply

You should have mentioned any division will turn the answer into a float.

31. sha p October 23, 2019 at 11:32 pm - Reply

Thank you , what are you pressing to run the code ?

thank you Corey

33. KB Z October 23, 2019 at 11:32 pm - Reply

What shall I do after finishing this playlist?

34. Yogananda T S October 23, 2019 at 11:32 pm - Reply

Does the original type of num_1 stays as a string if were to save the casted value in another variable ?
num_1='100'
num_1_casted= int(num_1)
I hope these types are called immutable,am i correct ?

35. florin potolinca October 23, 2019 at 11:32 pm - Reply

Hi Corey, great video man , one question please. if  num_1 = "100.25" it comes up with error. do you think I do something wrong ?

36. xyz122 October 23, 2019 at 11:32 pm - Reply

can you make a video on how to write python code professionally and using makefile github etc as a package or executable
if you can add a simple gui it would be great too

Hey @Corey_Schafer, I've seen lot of python programming in many sites its not perfect to me.But,you are real guru of python for me PythonGuru.The way to you teach is OSM .

38. Ankit Kumar October 23, 2019 at 11:32 pm - Reply

Isn't it advisable to print(int(num_1) + int(num_2)) instead of using two separate lines of code for the casting? Would that be wrong in any case?

39. Scott Wiseman October 23, 2019 at 11:32 pm - Reply

Corey we should cast you amazing = Super(Corey)

40. S Hwang October 23, 2019 at 11:32 pm - Reply

or u could just write num_1 = int("100")

41. GamingKin October 23, 2019 at 11:32 pm - Reply

I've literally racked my brain with Java for months a few years ago, and it was torture. Python seems so simple and easy to understand in comparison. It's honestly a more effective language for machine learning and data as well, if only I started with this, lol.

42. Nas October 23, 2019 at 11:32 pm - Reply

why don't python round negative numbers

43. akshay agrawal October 23, 2019 at 11:32 pm - Reply

i just compared the two string num1 and num2 and after printing it returned true.How is it possible to compare?

44. Eli. October 23, 2019 at 11:32 pm - Reply

wow thanks! I'm trying to learn Python and this by far is the best tutorial I've seen yet 🙂

45. jks Saha October 23, 2019 at 11:32 pm - Reply

a=int(input('enter a no'))
print (a)

It's giving an error…that invalid literal for int() with base 10: ' '

46. Hashpuppy October 23, 2019 at 11:32 pm - Reply

How can I convert a float 1.08e -5 to 0.00001080?

47. tarek orabi October 23, 2019 at 11:32 pm - Reply

Keep the good work up man! really enjoying this series