Operator - AP® Computer Science Definition

Reviewed by: James Woodhouse

Last updated

What is an operator?

In AP Computer Science, an operator is a symbol in programming that performs an action on one or more values (operands). Operators are used in expressions, calculations, and logical conditions.

Types of operators in Python:

  • Arithmetic operators: +, -, , /, %, * (e.g., sum = 5 + 3)

  • Comparison operators: ==, !=, >, <, >=, <=

  • Logical operators: and, or, not

  • Assignment operators: =, +=, -=, *=, /=

  • Bitwise operators: &, |, ^, <<, >>

Sign up for articles sent directly to your inbox

Receive news, articles and guides directly from our team of experts.

Share this article

James Woodhouse

Reviewer: James Woodhouse

Expertise: Computer Science

James graduated from the University of Sunderland with a degree in ICT and Computing education. He has over 14 years of experience both teaching and leading in Computer Science, specialising in teaching GCSE and A-level. James has held various leadership roles, including Head of Computer Science and coordinator positions for Key Stage 3 and Key Stage 4. James has a keen interest in networking security and technologies aimed at preventing security breaches.

The examiner written revision resources that improve your grades 2x.

Join now