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

Поділитися
Вставка
  • Опубліковано 25 сер 2024
  • 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:
    github.com/Cor...
    Watch the full Python Beginner Series here:
    • Python Programming Beg...
    ✅ Support My Channel Through Patreon:
    / coreyms
    ✅ Become a Channel Member:
    / @coreyms
    ✅ One-Time Contribution Through PayPal:
    goo.gl/649HFY
    ✅ Cryptocurrency Donations:
    Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
    Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
    Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
    ✅ Corey's Public Amazon Wishlist
    a.co/inIyro1
    ✅ Equipment I Use and Books I Recommend:
    www.amazon.com...
    ▶️ You Can Find Me On:
    My Website - coreyms.com/
    My Second Channel - / coreymschafer
    Facebook - / coreymschafer
    Twitter - / coreymschafer
    Instagram - / coreymschafer
    #Python

КОМЕНТАРІ • 437

  • @benzeltser9851
    @benzeltser9851 7 років тому +552

    I cannot understand how could anyone dislike this video series. Simply the greatest on UA-cam

    • @MyTube4Utoo
      @MyTube4Utoo 6 років тому +30

      +Ben Zeltser Most likely the dislikes are from people that also do Python tutorials, that know Corey's are superior. ;-)

    • @TrumanBurbonk
      @TrumanBurbonk 6 років тому +7

      mouse slip maybe :)

    • @P3C0L4
      @P3C0L4 6 років тому +6

      There are no dislikes here... its just another like after prople flip 180°

    • @toneo8385
      @toneo8385 6 років тому

      its awesome. he is the first i have seen being as coherent as the guy taking introduction to python on alison.com

    • @theflaminglionhotlionfox2140
      @theflaminglionhotlionfox2140 6 років тому +2

      My friend told me he doesn't like how fast he is, so there's that

  • @mahshidpooladvand8502
    @mahshidpooladvand8502 7 місяців тому +17

    This is the first time that I finish a tutorial without paying attention to how much time is left! Love you Corey.

    • @minarossi4991
      @minarossi4991 7 місяців тому

      I have this feelibng too. So goooood!

  • @Private-lw1td
    @Private-lw1td 3 місяці тому +11

    I'm just looking for a python refresher when I found this gem of a channel. I can't believe these were made 6 years ago and is still more informative than newer one I've found so far. Subscribed!

  • @sudarsandm
    @sudarsandm 7 років тому +177

    Hey Corey, You are my Python Guru. I like your style of teaching. It is quiet effective.

    • @coreyms
      @coreyms  7 років тому +24

      Thanks!

    • @prakashdoddi5095
      @prakashdoddi5095 5 років тому +4

      Hi, is there any similar tutorial for Big Data, good enough like Corey Schafer's tutorials.

    • @aquaman788
      @aquaman788 4 роки тому

      @@coreyms excellent python teacher!

    • @aquaman788
      @aquaman788 4 роки тому

      Also He does not sell his lectures ...... Great youtuber teacher

  • @sw00pingbird37
    @sw00pingbird37 Рік тому +6

    Great videos. I'm three videos in and this is exactly what I was looking for. Straight to the point, easy to understand, logical progressions, and very easy to follow along. Couldn't ask for more.

  • @seanearnest
    @seanearnest 5 років тому +22

    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.

  • @khaled-dz8357
    @khaled-dz8357 2 місяці тому +1

    I studies python basics with three courses but i found myself missed alot . You are the best python teacher on the planet

  • @benderbendingrofriguez3300
    @benderbendingrofriguez3300 4 роки тому +43

    Interesting Fact: Pacman's famous kill screen was due to an integer overflow.

  • @jameselliott3450
    @jameselliott3450 4 роки тому +9

    Hey,
    just wanted to say thank you! I'm trying to learn python during this crazy time and between you and my uncle (who is a coder) I'm slowly figuring this out.
    God Bless and Stay Safe!

  • @__vika
    @__vika Рік тому +4

    I used to think these videos were useless but the second video I ever watched inspired me to continue watching and learning on wither break!

    • @dmitryg7264
      @dmitryg7264 Рік тому +1

      way to go, Vika! Good luck in your learning journey. Slava Ukraini!

  • @immortalized_onion
    @immortalized_onion 3 роки тому +81

    Some notes:
    -------
    Numbers
    -------
    Types :-
    - int, normal integers like, -2,3,0 etc
    - float, decimal/fractional values like, -0.4, 9.83 etc.
    Arithmetic Operators :-
    - 3 + 2 # Addition
    - 3 - 2 # Subtraction
    - 3 * 2 # Multiplication
    - 3 / 2 # Division
    - 3 // 2 # Floor Division (rounds float to int)
    - 3 ** 2 # Exponent
    - 3 % 2 # Modulus (remainder)
    Comparisons :-
    - return either true or false
    - 3 == 2 # Equal
    - 3 != 2 # Not Equal
    - 3 > 2 # Greater Than
    - 3 < 2 # Less Than
    - 3 >= 2 # Greater or Equal
    - 3

  • @Glenn.Cooper
    @Glenn.Cooper 4 роки тому +5

    Corey - what a fantastic video series. An easy to follow tone of voice, the right information, the right depth, the right speed of delivery. Thank you so much!!

  • @stuthomas3593
    @stuthomas3593 3 роки тому +1

    Corey Schafer's Python educational videos are by far the best I have come accross. I have been learning, and now teaching python coding, for several years but Corey's teachings have been invaluable. I should really recommend my own video's but for all levels of Python Corey Schafer is THE first place I'd suggest for everyone. Thanks to Corey @coreyschafer for the excellent work.

  • @gokulrajkumarassamy1658
    @gokulrajkumarassamy1658 4 роки тому +12

    I have watched countless python tutorials this one is the best I've ever seen. Great Job Man!

  • @mitramansouri9242
    @mitramansouri9242 5 років тому +24

    Dude this is so good , now I come here to watch something more than old vines 😅

  • @melvin9993
    @melvin9993 6 років тому +7

    One the best Python tutorial I have seen! Very Effective

  • @eli.4745
    @eli.4745 5 років тому +5

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

  • @user-di4bt7qu2i
    @user-di4bt7qu2i 6 років тому +5

    Really liking your vids Corey. I like them a lot better than the on-line classes I bought. Thanks for sharing your knowledge.

  • @domss1174
    @domss1174 6 років тому +17

    thank you Corey for this beginner series, I've been struggling for a long time on these basic concepts and saw a lot of videos but your videos are the best!

  • @nomcognom2332
    @nomcognom2332 7 років тому +27

    Good series, basic but gold. :)

  • @ritasvystun3505
    @ritasvystun3505 4 роки тому +2

    I am beyond happy to have found your video tutorials!!! Easy and effective! Loving it! Thanks for your work!

  • @hunterreehoorn7831
    @hunterreehoorn7831 6 місяців тому

    I’m currently in a python course in college and these videos are an invaluable resource

  • @sayakroy7547
    @sayakroy7547 4 роки тому

    I really dont understand that how could anymne this video series. the best python tutorial series in the youtube. i have searched a lot of video series in python that coud meet my expectation and at last found the best one in this channel. Thank you very much for this video series. Probably i will be a good python developer in my future if i truly follow this video series.

  • @jarradluckey4170
    @jarradluckey4170 6 років тому +3

    Focusing on a career change and this surely helps. Looking for word to viewing this series.

  • @kalangiprasad4073
    @kalangiprasad4073 5 років тому +2

    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 .

  • @swallowedinthesea11
    @swallowedinthesea11 3 роки тому +1

    10:38 I think it's a bug.
    num1 = int('100')
    num2 = int('200')
    print('This is Sparta!')
    Great tutorial and Merry Christmas, Corey!

  • @ashleyhaa
    @ashleyhaa 4 роки тому

    I've had a roadblock with Python these past few months and this video series has SAVED ME. thank you so much Corey! You're awesome

  • @hi1706
    @hi1706 3 роки тому

    thank you so so much, i have my python certification on friday and i couldn’t find any good youtube videos that teach as well as you.

  • @subhajitsaha1621
    @subhajitsaha1621 4 роки тому +1

    hi corey, i appreciate your work....very simple to understand.....anybody can learn python by watching your videos.

  • @MaazAkhtarKhattak
    @MaazAkhtarKhattak 5 місяців тому

    Learned A lot in 2 vedios . I have watched a lot of tutorials but this guy bring Python in an easy and sample way.Thanks Alot❤❤❤❤❤❤❤.

  • @gamingkin4278
    @gamingkin4278 5 років тому +2

    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.

    • @sinistergeek
      @sinistergeek 5 років тому +2

      Your hardwork paid off bruh!! because we use similar approach or general concept to every programming language that's why it's so easy to learn python for you to learn !!!

    • @sinistergeek
      @sinistergeek 5 років тому +2

      If your choice was to learn a few year back then he wouldn't had started his python tutorial and by far he's best teacher in youtube personally recommend hahah i forget you have already watch!!

  • @aestheticalphaa
    @aestheticalphaa 6 років тому +7

    Hi Corey,
    First of all many thanks to uploads this training series. It is great and intensive learning.
    Request you to also upload python for Data Analytics and machine learning.
    Python Pandas Numpy, Scipy, Hadoop.
    Thanks again

  • @Oogaboogawhat
    @Oogaboogawhat Рік тому +1

    Corey--I asked ChatGPT what are some good videos to watch for learning how to code in Python and you were its first recommendation!

    • @vivim4153
      @vivim4153 Рік тому

      I asked it study plan and it got me here

  • @muddaarmy8647
    @muddaarmy8647 6 років тому +9

    Hi Corey, great content. I'm learning a lot from your tutorials. Just started today. Keep them coming! Thank you!

  • @iluvuvibez6644
    @iluvuvibez6644 2 роки тому

    Wow! Now, I know what's the difference between int and string numbers! I thought it was the same... that makes a big difference! Thank you so much! So many people couldn't explain it correctly!

  • @hiseggcelency
    @hiseggcelency Рік тому

    Wow... Thanks Corey, you are golden as always. You make learning not only crystal clear but also enjoyable. Ive gave up on learning coding 2 years ago after burning out, but im back on track, stronger and more persistent then ever! Cant wait to revisit all the concepts.

  • @clarkh3314
    @clarkh3314 4 роки тому +1

    Thank you for these videos, Corey! As someone primarily using genomics in grad school this is extremely helpful to get my feet into the python door.

  • @milansaram
    @milansaram 2 роки тому

    One of the best videos found in UA-cam.

  • @Nadimiacr
    @Nadimiacr 3 роки тому

    My friend has recommended you to look to your videos. Your teaching style is very good anyone can understand easily...

  • @karnaghose4784
    @karnaghose4784 4 роки тому +1

    Thanks a lot Schafer, your videos are highly useful. You're a great teacher.

  • @daenyboi
    @daenyboi 9 місяців тому

    Finally found a perosn that talks real english that can be listened to and understood. Im just starting out in python and we got a the 900 page starting out with python book, and it tells me to do excersises i dont understand even though i read most of chapters.. ;O

  • @sim7699
    @sim7699 5 років тому +3

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

  • @karmalixa
    @karmalixa 4 роки тому

    this actually works, too.
    Casting pretty much works the same in most languages.
    ##casting v1
    num1 = int("100")
    num2 = int("200")
    ##casting v2
    num1 = int(num1)
    num2 = int(num2)
    #casting v3
    print (int(num1) + int(num2))
    - so you can directly cast when printing.

  • @tomlemanh5506
    @tomlemanh5506 7 років тому +5

    Corey, huge fan of yours, even though I haven't seen much of your contents, but still... I can already tell, it's like a gold mine to me. Have you ever considered opening a course on udemy? I really love your teaching and would love to support you there

    • @coreyms
      @coreyms  7 років тому +16

      I have thought about it. I am still working a full-time job at the moment and don't have time to write a course for their platform, but if I ever do tutorials as a full-time job then I will likely try to put a couple of courses up there. No matter what, I will also always have my video available for free on UA-cam so that anyone can watch.

    • @tomlemanh5506
      @tomlemanh5506 7 років тому +5

      Corey Schafer you da real mvp. The unsung hero Corey

    • @exili
      @exili 6 років тому

      Thanks so much for the time you put in to these! Super helpful and easy to understand.

  • @TwstedTV
    @TwstedTV 4 роки тому

    I just learned recently that casting is the long way and was told to do this instead. I am current using python 3.8
    So this might be very new, than the time that you posted this video. :)
    num_1 = (int('100'))
    num_2 = (int('200'))
    print(num_1 + num_2)
    300

  • @xLightcrystalx
    @xLightcrystalx 2 роки тому

    I love the pacing of these.

  • @alexanderten5497
    @alexanderten5497 5 років тому +1

    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.

    • @coreyms
      @coreyms  5 років тому

      No worries. That helps a ton as well! Thanks!

  • @flirtuall78
    @flirtuall78 2 місяці тому

    Thanks for sharing your knowledge and experience.

  • @karthikyatish3323
    @karthikyatish3323 5 років тому +2

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

  • @yoshitagupta3761
    @yoshitagupta3761 4 роки тому +1

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

  • @chriskapis1690
    @chriskapis1690 4 роки тому +1

    best teacher for python

  • @loufadoros20
    @loufadoros20 Рік тому

    Great Job Corey! I started feeling confident with Python with your step to step approach

  • @ivankr459
    @ivankr459 4 роки тому

    Best Python Tuto I've seen so far!
    Thanks Corey.

  • @TheSuccessfulLeader
    @TheSuccessfulLeader 4 роки тому +1

    Thank you Corey Schafer: great information on the latest Python updates...

  • @alicjajasinska4445
    @alicjajasinska4445 4 роки тому

    At 3 forums I had problem do clearly understand int and float, I saw your one video and everything is clear. :D Thank you!

  • @dadnumber1140
    @dadnumber1140 4 роки тому +1

    Great work please keep it up I get a lot out of your videos

  • @ivy_xxy
    @ivy_xxy 2 місяці тому +1

    😭bro is a life saver. I get nothing what my professor taught, especially being a psychology student n prior bg, but this is just🫠🕯️

  • @tareko7645
    @tareko7645 5 років тому +1

    Keep the good work up man! really enjoying this series

  • @runeblade6596
    @runeblade6596 2 роки тому

    So far this feels pretty easy to follow along. Thanks!

  • @MyVaibhavraj
    @MyVaibhavraj 4 роки тому

    Hello Corey , it's amazing feeling that I found out the greatest vids on python.
    Tonnes of thanks to you

  • @alexlandherr
    @alexlandherr 3 роки тому

    Very good explanation of modulus, I’ve not had it put to me in this way before so I finally got it.

  • @Misslilac-c6j
    @Misslilac-c6j 3 місяці тому

    So happy I started this

  • @bumblee_beee
    @bumblee_beee Рік тому

    Thanks for the simple explanation...
    I have started to watch the first video today ....
    And I will try to update once I complete.✨💜

  • @ShynggysZ
    @ShynggysZ 4 роки тому +3

    cheat sheet:
    type(num) shows type of the variable
    # Arithmetic Operators:
    # Addition: 3 + 2
    # Subtraction: 3 - 2
    # Multiplication: 3 * 2
    # Division: 3 / 2
    # Floor Division: 3 // 2
    # Exponent: 3 ** 2
    # Modulus: 3 % 2
    shortcut num += 1
    abs(-3) absolute value
    round(3.75, 1) round to decimal digit
    # Comparisons:
    # Equal: 3 == 2
    # Not Equal: 3 != 2
    # Greater Than: 3 > 2
    # Less Than: 3 < 2
    # Greater or Equal: 3 >= 2
    # Less or Equal: 3

    • @nohayfuentes4649
      @nohayfuentes4649 4 роки тому

      Thanks i always search for ur comment xd I see we're learning python in same time I hope we could learn together

  • @mselim-o7p
    @mselim-o7p 5 років тому +1

    That is really soo good! I advise to everyone working with Python.

  • @dragonwarrior6831
    @dragonwarrior6831 3 роки тому +3

    This tutorial, especially the round function was so useful for me!! Thanks a ton for putting up such a great effort

  • @RCPorter92
    @RCPorter92 4 роки тому

    One thing that could have been included in this video is how to convert floating point values to standard numbers with decimals for use with monetary values. Otherwise, very informative. Also, I'm commenting on these videos as I go, so if the aforementioned technique is included in a different video, please disregard this comment.
    Once again, these videos are amazingly helpful. Thank you for doing what you do!

  • @brucemcgoveran8154
    @brucemcgoveran8154 Рік тому +1

    Even five (or more) years after you made, it continues to help. Thank you. A quick question about the operation you called casting, when converting num_1 and num_2 from strings to integers: wasn't this more the creation of two new integer objects rather than casting in the traditional sense? From my (limited) knowledge of other languages, I understood casting to be a temporary operation that forced a change in variable/object type without actually creating new objects. What happens in your examples seems to create new integer objects, based on the code I've run.

  • @johnrodi3527
    @johnrodi3527 4 роки тому +1

    This was really thorough. I learned a lot.

  • @theresaanderssons94
    @theresaanderssons94 5 років тому +7

    Omg this really helped THANKS

  • @mystikalhunk
    @mystikalhunk 4 роки тому +1

    Thank you so much for that explanation, You explained it beautifully

  • @vireakroth8337
    @vireakroth8337 4 роки тому +1

    Directly to the point needs to learn not washing time I like it.

  • @theegreatestever2420
    @theegreatestever2420 2 роки тому

    I keep saying this on every video but damn your videos are so short and yet give possibly the best explanations out there damn! Love from South Africa and highly appreciate you

  • @KINGTAWO101
    @KINGTAWO101 Рік тому

    thank for sharing your nuggets of wisdom through this tutorials

  • @sunnyveerpratapsingh1102
    @sunnyveerpratapsingh1102 4 роки тому

    after so many searches I finally found the best .. here thanks

  • @vahidx1265
    @vahidx1265 3 місяці тому +1

    I just love the way he talks 😂❤

  • @soumyazyx
    @soumyazyx 4 роки тому

    Thank you Corey for your time and effort. Keep spreading the knowledge.

  • @sudipbose5191
    @sudipbose5191 4 роки тому

    Sir, Just Awesome explanations! What a YT channel I dropped into after finding multiple resources, goddam! Corey sir rocks!

  • @brittanygentry5911
    @brittanygentry5911 2 роки тому

    Easy to understand, well explained thank you!

  • @sadrajazayeri1063
    @sadrajazayeri1063 3 роки тому

    Goood job on the explaining easy for everyone.

  • @TheAirForceNinja
    @TheAirForceNinja 5 років тому +1

    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))

  • @thapasujan07
    @thapasujan07 11 годин тому

    Thank you, Sir.

  • @genderlessalex
    @genderlessalex 3 роки тому

    My teacher sent us this video so we can understand Python (because the school is closed and he can't really teach us now). But he can not speak english at all (we are hungarians), and Idk why does he expect us to know english if he can't even speak it. lol
    But the video was good. It's really helpfull.

  • @bumblee_beee
    @bumblee_beee Рік тому

    Wow clear explanation.
    Thanks for so much effort.

  • @ietk2005
    @ietk2005 2 роки тому

    Very nice video with appropriate content and examples!

  • @ttrindademendes
    @ttrindademendes 4 роки тому +1

    Thank you, it was very useful, I appreciate your work!

  • @BlackMamba-vl4ks
    @BlackMamba-vl4ks 4 роки тому

    These videos are just great.

  • @mohammadalimovasati865
    @mohammadalimovasati865 4 роки тому +1

    thanks verrryyyy moch for this video

  • @Sol-hm7ol
    @Sol-hm7ol 6 років тому

    thanks for making this, extremely helpful for remembering the basics.

  • @garrybeck216
    @garrybeck216 5 років тому +1

    Thanks Corey.

  • @ayaemad6796
    @ayaemad6796 4 роки тому

    thank you so much for your effort... this is the best channel for learning programming :)

  • @shreyaschavhan5522
    @shreyaschavhan5522 Рік тому +5

    + Built in functions: 5:30
    == abs()
    == round()
    + Casting String to Int: 10:26

  • @JoshuaDHarvey
    @JoshuaDHarvey 4 роки тому +1

    great video, thank you!

  • @sivakrishna8952
    @sivakrishna8952 5 років тому

    Parker.. you rocks.. You are my life changer....

  • @hurayosefi355
    @hurayosefi355 4 роки тому

    thank you so much best best python videos ever

  • @bpkoiralaproductions6004
    @bpkoiralaproductions6004 4 роки тому +1

    You just got a new subscriber!

  • @sjha591985
    @sjha591985 6 років тому

    Thanks Corey, I am new in scripting.. Your videos lead me to learn python using sublime text... Thanks :)
    It helpful (Y)....

  • @liuqs1990
    @liuqs1990 2 місяці тому +1

    #Arithmetic Operators:
    #Addition: 3+2
    #Subtraction: 3-2
    #Multiplication: 3*2
    #Division: 3/2
    #Floor Division: 3//2
    #Exponent: 3**2
    #Modulus: 3%2
    #Comparisons:
    #Equal: 3 == 2
    #Not Equal: 3 != 2
    #Greater Than: 3 > 2
    #Less Than: 3 < 2
    #Greater or Equal 3 >= 2
    #Less or Equal: 3

  • @iswaryaish3654
    @iswaryaish3654 4 роки тому

    Osm it's very clear nd we can easily understood nd i also loved itt. we can see by his videos 💯 sure.there is no need be worry abt on dis surely it works😊😊 tkuuuu so muchh corey sirrr😍😍😍😍

  • @MultiDpz
    @MultiDpz 4 роки тому +1

    Awesome video as usual .. Thanks :)