Arithmetic - Programming Basics - KS3 Computer Science Revision - BBC Bitesize
Arithmetic - Programming Basics - KS3 Computer Science Revision - BBC Bitesize
KS3
Programming basics
Arithmetic
Programming is writing computer code to create a
program, in order to solve a problem. To program a
computer, you need to know how programs are
constructed.
Save to My Bitesize
Revise Test
Pages
Arithmetic
Variables
Naming variables
Basic arithmetic
Arithmetic is used all the time in computer programs, so an understanding of
how computers use arithmetic is useful. This table lists the common
arithmetic processes with their programming equivalents:
Addition (plus) +
Arithmetic process Programming equivalent
Subtraction (minus) -
Multiplication *
Division /
>>> print(5 + 7)
12
>>> print(7 - 5)
2
>>> print(5 * 7)
35
>>> print(35 / 7)
5.0
Next page
Variables
Related links
Jobs that use Computer Science BBC Click BBC Technology news
English
Code Club Subscription Educational App Store Subscription
Terms of Use About the BBC Privacy Policy Cookies Accessibility Help Parental Guidance
Contact the BBC Get Personalised Newsletters Why you can trust the BBC Advertise with us
© 2024 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external
linking.