| about | help | code help+videos | done | prefs |
distanceFromTarget
🔹 Problem Description You are building part of a fitness tracking app. Your daily step goal is 10,000 steps. Write a method called distanceFromTarget that takes in how many stepsToday. It should: Calculate how far they are from the 10,000-step goal. Always return a positive number. distanceFromTarget(8000) → 2000 distanceFromTarget(12000) → 2000 distanceFromTarget(10000) → 0 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy