Revise Computing
Revision notesQuestionsFor schools
Log inStart revising free
Revision notesQuestionsFor schoolsLog in
GCSE Computer Science/Supplementary programming practice/Arithmetic Operators

Exponentiation

301.2 Arithmetic Operators

Practise exam questions

Arithmetic Operators — Note 3 of 4

Use powers in code.

What you need to know

The ** operator raises a number to a power. It is Python's equivalent of the mathematical exponent notation.

What to know

  • ** means 'to the power of': 2 ** 3 → 8
  • Can be used for squares: n ** 2
  • Can be used for square roots: n ** 0.5
  • Evaluated before * and / in precedence

Code examples

Exponentiation
python
print(2 ** 3)    # 8
print(5 ** 2)    # 25
print(9 ** 0.5)  # 3.0 (square root)
← Previous noteDIV and MOD301.2 Arithmetic OperatorsNext note →Operator precedence301.2 Arithmetic Operators

Back to Arithmetic Operators

Specification notes for programming are in Paper 2.

Arithmetic Operators

Note 3 of 4

  1. 1Arithmetic operators
  2. 2DIV and MOD
  3. 3Exponentiation
  4. 4Operator precedence
Topic overview

© 2026 Revise Computing · revisecomputing.co.uk

Privacy noticeTermsContact

Revise Computing is an independent revision resource. It is not affiliated with, or endorsed by, OCR (Oxford Cambridge and RSA Examinations).