René's URL Explorer Experiment


Title: Python Modulo: Using the % Operator (Overview) (Video) – Real Python

Open Graph Title: Python Modulo: Using the % Operator (Overview) – Real Python

Description: Welcome to Python Modulo in Practice, or How to Use the % Operator. My name is Chris and I will be your guide. In this course, you’ll learn about modular arithmetic, how to use the percent operator (%) with int and float types, common coding uses of…

Open Graph Description: Welcome to Python Modulo in Practice, or How to Use the % Operator. My name is Chris and I will be your guide. In this course, you’ll learn about modular arithmetic, how to use the percent operator (%) with int and float types, common coding uses of…

Opengraph URL: https://realpython.com/videos/python-modulo-overview/

X: @realpython

direct link

Domain: realpython.com


Hey, it has json ld scripts:
  {
    "@context": "https://schema.org",
    "@type": "VideoObject",
    "name": "Python Modulo: Using the % Operator (Overview)",
    "description": "Welcome to Python Modulo in Practice, or How to Use the % Operator. My name is Chris and I will be your guide. In this course, you’ll learn about modular arithmetic, how to use the percent operator (%) with int and float types, common coding uses of…",
    "thumbnailUrl": ["https://files.realpython.com/media/Python-Modulo-in-Practice-How-to-Use-the--Operator_Watermarked.e2c969c91ddc.jpg"],
    "uploadDate": "2021-02-09T14:00:00+00:00",
    "duration": "PT1M44S",
    "embedUrl": "https://player.vimeo.com/video/505894125",
    "potentialAction": {
      "@type": "SeekToAction",
      "target": "https://realpython.com/videos/python-modulo-overview/#t={seek_to_second_number}",
      "startOffset-input": "required name=seek_to_second_number"
    }
  }
  

authorReal Python
twitter:cardsummary_large_image
twitter:imagehttps://files.realpython.com/media/Python-Modulo-in-Practice-How-to-Use-the--Operator_Watermarked.e2c969c91ddc.jpg
og:imagehttps://files.realpython.com/media/Python-Modulo-in-Practice-How-to-Use-the--Operator_Watermarked.e2c969c91ddc.jpg
twitter:creator@realpython
og:typevideo.episode

Links:

https://realpython.com/
Start Herehttps://realpython.com/start-here/
Learn Python https://realpython.com/videos/python-modulo-overview/
Python Tutorials →In-depth articles and video courseshttps://realpython.com/search?kind=article&kind=course&order=newest
Learning Paths →Guided study plans for accelerated learninghttps://realpython.com/learning-paths/
Quizzes & Exercises →Check your learning progresshttps://realpython.com/quizzes/
Browse Topics →Focus on a specific area or skill levelhttps://realpython.com/tutorials/all/
Community Chat →Learn with other Pythonistashttps://realpython.com/community/
Office Hours →Live Q&A calls with Python expertshttps://realpython.com/office-hours/
Podcast →Hear what’s new in the world of Pythonhttps://realpython.com/podcasts/rpp/
Books →Round out your knowledge and learn offlinehttps://realpython.com/products/books/
Reference →Concise definitions for common Python termshttps://realpython.com/ref/
Code Mentor →BetaPersonalized code assistance & learning toolshttps://realpython.com/mentor/
Unlock All Content →https://realpython.com/account/join/
More https://realpython.com/videos/python-modulo-overview/
Learner Storieshttps://realpython.com/learner-stories/
Python Newsletterhttps://realpython.com/newsletter/
Python Job Boardhttps://www.pythonjobshq.com
Meet the Teamhttps://realpython.com/team/
Become a Tutorial Writerhttps://realpython.com/write-for-us/
Become a Video Instructorhttps://realpython.com/become-an-instructor/
Searchhttps://realpython.com/search
https://realpython.com/search
Joinhttps://realpython.com/account/join/
Sign‑Inhttps://realpython.com/account/login/?next=%2Fvideos%2Fpython-modulo-overview%2F
https://realpython.com/courses/python-modulo-operator/#team
Python Modulo: Using the % Operatorhttps://realpython.com/courses/python-modulo-operator/
Christopher Trudeauhttps://realpython.com/courses/python-modulo-operator/#team
Recommended Tutorialhttps://realpython.com/python-modulo-operator/
Course Slides (.pdf)https://realpython.com/courses/python-modulo-operator/downloads/modulo-slides/
Sample Code (.zip)https://realpython.com/courses/python-modulo-operator/downloads/modulo-sample-code/
Ask a Questionhttps://realpython.com/videos/python-modulo-overview/#discussion
https://realpython.com/feedback/survey/course/python-modulo-operator/liked/?from=lesson-title
https://realpython.com/feedback/survey/course/python-modulo-operator/disliked/?from=lesson-title
Contentshttps://realpython.com/videos/python-modulo-overview/#description
Transcripthttps://realpython.com/videos/python-modulo-overview/#transcript
Discussionhttps://realpython.com/videos/python-modulo-overview/#discussion
arithmetic operatorshttps://realpython.com/python-operators-expressions/#arithmetic-operators
numbershttps://realpython.com/python-numbers/
Sample Code (.zip)https://realpython.com/courses/python-modulo-operator/downloads/modulo-sample-code/
Course Slides (.pdf)https://realpython.com/courses/python-modulo-operator/downloads/modulo-slides/
00:00https://realpython.com/videos/python-modulo-overview/#t=0.48
Welcome to Python Modulo in Practice, or How to Use the % Operator.https://realpython.com/videos/python-modulo-overview/#t=0.48
My name is Chris and I will be your guide. In this course,https://realpython.com/videos/python-modulo-overview/#t=6.21
you’ll learn about modular arithmetic,https://realpython.com/videos/python-modulo-overview/#t=9.81
how to use the percent operator (%) with int and float types,https://realpython.com/videos/python-modulo-overview/#t=12.03
common coding uses of the % operator, and how to use % with customhttps://realpython.com/videos/python-modulo-overview/#t=15.54
classes.https://realpython.com/videos/python-modulo-overview/#t=20.16
00:22https://realpython.com/videos/python-modulo-overview/#t=22.56
Python’s % operator’s been around for a long time.https://realpython.com/videos/python-modulo-overview/#t=22.56
The code I’m going to show you has all been tested using Python 3.9,https://realpython.com/videos/python-modulo-overview/#t=25.71
but you should be able to use it in pretty much any version of Python.https://realpython.com/videos/python-modulo-overview/#t=29.49
00:34https://realpython.com/videos/python-modulo-overview/#t=34.11
So, what’s it for? Well, the % operator does modular arithmetic.https://realpython.com/videos/python-modulo-overview/#t=34.11
That means getting the remainder portion of doing some division.https://realpython.com/videos/python-modulo-overview/#t=39.12
For example, 14 divided by 4 is 3 remainder 2.https://realpython.com/videos/python-modulo-overview/#t=43.71
00:48https://realpython.com/videos/python-modulo-overview/#t=48.18
3 times 12 is 12,https://realpython.com/videos/python-modulo-overview/#t=48.18
and there’s 2 leftover. 14 mod 4 returns 2, the remainder from the division.https://realpython.com/videos/python-modulo-overview/#t=49.44
Python’s operator for that mod operation is percent (%). Modulus pops up in a bunchhttps://realpython.com/videos/python-modulo-overview/#t=56.16
of places inside of your code.https://realpython.com/videos/python-modulo-overview/#t=61.92
01:03https://realpython.com/videos/python-modulo-overview/#t=63.48
Some common uses are detecting even versus odd numbers,https://realpython.com/videos/python-modulo-overview/#t=63.48
looping on cycles of data, doing unit conversion—for example,https://realpython.com/videos/python-modulo-overview/#t=67.59
if you want to take a large number of inches and turn it into feet and incheshttps://realpython.com/videos/python-modulo-overview/#t=71.7
if you’re using the American Imperial system.https://realpython.com/videos/python-modulo-overview/#t=76.08
01:19https://realpython.com/videos/python-modulo-overview/#t=79.23
Or, if you want to take a large number of minutes and turn it into hours andhttps://realpython.com/videos/python-modulo-overview/#t=79.23
minutes, you’ll need the modulus operation.https://realpython.com/videos/python-modulo-overview/#t=82.5
01:26https://realpython.com/videos/python-modulo-overview/#t=86.16
Everything in Python is an object,https://realpython.com/videos/python-modulo-overview/#t=86.16
so you can take advantage of this and write your own objects that support thehttps://realpython.com/videos/python-modulo-overview/#t=87.96
% operator. You do this by overriding .__mod__().https://realpython.com/videos/python-modulo-overview/#t=91.53
01:36https://realpython.com/videos/python-modulo-overview/#t=96.06
I’ll show you how to do this later on in the course.https://realpython.com/videos/python-modulo-overview/#t=96.06
01:39https://realpython.com/videos/python-modulo-overview/#t=99.9
Next up, an introduction to modular arithmetic.https://realpython.com/videos/python-modulo-overview/#t=99.9
Become a Memberhttps://realpython.com/account/join/
Overviewhttps://realpython.com/courses/python-modulo-operator/
https://realpython.com/videos/modular-arithmetic/
Python Modulo: Using the % Operator (Overview) 01:44 https://realpython.com/videos/python-modulo-overview/
Modular Arithmetic 03:36 https://realpython.com/videos/modular-arithmetic/
Python % Operator 07:00 https://realpython.com/lessons/python-mod-operator/
Common Uses of % 08:57 https://realpython.com/lessons/common-uses-mod/
Advanced Uses and Overriding .__mod__ 09:00 https://realpython.com/lessons/overriding-dunder-mod/
Python Modulo: Using the % Operator (Summary) 03:40 https://realpython.com/lessons/python-modulo-summary/
Privacy Policyhttps://realpython.com/privacy-policy/

Viewport: width=device-width, initial-scale=1, shrink-to-fit=no, viewport-fit=cover

Robots: max-image-preview:large


URLs of crawlers that visited me.