Common Arithmetic Operators (OCR GCSE Computer Science): Revision Note
Exam code: J277
Common Arithmetic Operators
To demonstrate the use of common arithmetic operators, three sample programs written in Python are given below
Comments have been included to help understand how the arithmetic operators are being used
Arithmetic operators #1 - a simple program to calculate if a user entered number is odd or even
Arithmetic operators #2 - a simple program to calculate the area of a circle from a user inputted radius
Arithmetic operators #3 - a simple program that generates 5 maths questions based on user inputs and gives a score of how many were correctly answered at the end
Python code |
|
You've read 0 of your 5 free revision notes this week
Unlock more, it's free!
Did this page help you?