Python - Exponents, Modular Exponents, Modular Inverse Tutorial

Описание к видео Python - Exponents, Modular Exponents, Modular Inverse Tutorial

In-depth tutorial on exponents and exponentiation with Python, geared to beginners. Discussion of different ways to raise numbers to a power in Python (base**exponent, and pow(base, exponent)), taking an exponent of a negative number, taking a negative exponent, what a "modulus" or "modular value" is and how we can use pow to find an exponent with a set modular value (pow(base, exponent, mod)), how to use pow() to find the modular inverse of a number, how to raise the modular inverse to an exponent, and finally the math.pow() function in the math module and how it differs from pow(). Time stamps are below.

What is an exponent? - 1:19
base**exponent - 2:20
pow(base, exponent) - 3:38
Taking exponent of a negative number (pow(-base, exponent)) - 5:40
Using a negative exponent (pow(base, -exponent)) - 6:26
Taking non-integer exponent of negative number(pow(-base, non-integer exponent)), brief discussion of complex numbers - 8:50
Importance of order of operations with exponents - 11:06
Introduction to modular arithmetic - 13:23
Exponent with "mod" value (pow(base, exponent, mod)) - 15:22
Discussion of modulo (%) operator as remainder in long division -17:13
Other examples to show use of modulo (%) - using % 2 to see if an integer is even or odd (19:00), using %12 to show arithmetic with hours on a clock (21:30)
Taking exponent with negative modular value -23:24
Taking modular inverse using pow() - 24:44
Exponentiating modular inverse using pow() - 34:50
math.pow() and how it differs from pow() - 38:20
Brief note on complex numbers and cmath - 42:07

For more information on pow(), see https://docs.python.org/3/library/fun...

For more information on math.pow(), see https://docs.python.org/3/library/mat...

This tutorial uses Python 3.8.3. To download the current version of Python, visit: https://www.python.org/. It also uses PyCharm (Community Edition). To download PyCharm, visit: https://www.jetbrains.com/pycharm/. Note that in this video I occasionally reference PyCharm "suggesting" items to fill in - these popped-up suggestions were not captured by the videorecording and so do not appear in the video (e.g. at 3:36 and again at 13:31 I reference PyCharm showing me a pop-up suggestion of base, exponent, mod, these did appear to me but were not captured in the recording).

Комментарии

Информация по комментариям в разработке