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
      18 of 102

      Do they move together?

      Write together(xs, ys): one number for how much two lists move together, like the hours five students studied and the scores they got. Positive means they rise together, negative means one falls as the other rises.

      Five students: how many hours each studied, and the score each got. Do the hours and the scores rise together? Your function answers with one number. Drag the students to make other clouds.

      24607080hours studied →↑ test scoretogether(xs, ys)?
      Your functiontogether(xs, ys)
      xstwo lists of the same length, e.g. hours studied and test scorese.g. [1, 2, 3, 4, 5]
      ystwo lists of the same length, e.g. hours studied and test scorese.g. [55, 70, 60, 85, 75]
      returnsone number: how much they move together
      solution.pyLoading Python
      Sign in for an AI hint
      ← The shadowWhich fruit is it? →