Skip to content

Conversation

@TheAhumMaitra
Copy link

@TheAhumMaitra TheAhumMaitra commented Aug 23, 2025

This PR updates the tutorial's introduction section by adding an example of the
** operator (exponentiation). It demonstrates how to raise a number to a power,
using 2 ** 9 as the example for clarity.


📚 Documentation preview 📚: https://cpython-previews--138096.org.readthedocs.build/

@python-cla-bot
Copy link

python-cla-bot bot commented Aug 23, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIreland
Copy link
Member

StanFromIreland commented Aug 23, 2025

There already are examples, a paragraph below, when the operator is introduced:

With Python, it is possible to use the ** operator to calculate powers [#]_::

 >>> 5 ** 2  # 5 squared
 25
 >>> 2 ** 7  # 2 to the power of 7
 128

It is not in the section you have added the example to as it has not yet introduced exponentiation:

... the operators +, -, * and / ...

@StanFromIreland StanFromIreland added skip issue pending The issue will be closed if no feedback is provided labels Aug 23, 2025
@TheAhumMaitra TheAhumMaitra force-pushed the add-exponentiation-example-in--introduction-file branch from 507c6b5 to ffe8598 Compare August 23, 2025 19:24
@ZeroIntensity
Copy link
Member

Yeah, sorry. I agree with Stan -- we're only introducing the arithmetic operators here. ** is introduced right below.

@ZeroIntensity ZeroIntensity removed the pending The issue will be closed if no feedback is provided label Aug 23, 2025
@TheAhumMaitra TheAhumMaitra deleted the add-exponentiation-example-in--introduction-file branch December 11, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

3 participants