215e3d084b
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
914 B
914 B
Hints
1. Create a brand-new remote controlled car
- The result can use a constant object.
2. Create a brand-new remote controlled car with a nickname
- Consider calling the 0-arity function and piping the result to assign the nickname.
3. Display the distance
- String interpolation would be useful here.
4. Display the battery percentage
- The if expression is needed.
5. Driving changes the battery and distance driven
- Arithmetic update-assignments will be useful here.
6. Account for driving with a dead battery
- If the battery is dead, it should return the object unchanged.