Focus video player for keyboard shortcuts
Auto
- 720p
- 540p
- 360p
1.00x
cc
- 0.50x
- 0.75x
- 1.00x
- 1.25x
- 1.50x
- 1.75x
- 2.00x
We hope you enjoyed this lesson.
Cool lesson, huh? Share it with your friends
About this lesson
How to do basic math with Ruby.
Exercise files
Download this lesson’s related exercise files.
Arithmetic Operators58.6 KB Arithmetic Operators - Solution
58.7 KB
Quick reference
Arithmetic Operators
Doing basic math with Ruby is a breeze.
When to use
There are many different reasons for using math when coding, you'll use this a lot!
Instructions
Here are the basic math operators:
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponents
% Modulus
Hints & tips
- Math is super easy with Ruby!
Lesson notes are only available for subscribers.