Spooky Sale: 10% off Premium yearly · $118.80 for the first year · until Nov 6Get it

Deep-ML
Learn
Problems1,200+ hands-on ML problemsLearning PathA guided route through the fundamentalsLabsInteractive labs on real techniquesProjectsBuild a GPT, an RL agent, CUDA kernelsCollectionsCurated problem sets and videosMathPen-and-paper math for MLIntuitionInvent the idea behind the formula yourselfPlaylistsYour own problem lists, shareableStudy AssistantAn AI teacher that knows your progress
Interview Prep
Compete
ContestsFresh problem sets, ranked liveLeaderboardWhere you stand, globallyBuddiesSolve with a friend: streaks, a weekly board, chat
Discuss
Deep-Path
Premium
      Intuition
      51 of 88

      Walk downhill

      You’re on a hill in thick fog, trying to reach the bottom. You can’t see it; you can only feel the slope under your feet: how steeply the ground rises as you go right (negative means it rises to the left). Write step(position, slope, step_size): where your next step should land.

      for example, a bowl-shaped hill: at position 3 the ground rises to the right with slope 6● start 3−4−3−2−101234
      solution.pyLoading Python
      ← How wrong is the forecast?Through the cloud →