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

      Grade calculator

      Write final_grade(scores, weights): one final grade from several scores, where some count more than others. The weights can be any positive amounts: percents like 20, 30, 50, or parts like 2, 3, 5.

      A course has homework, a midterm and a final, and the final counts the most. Each score sits on the beam as a stack as heavy as it counts. The final grade is where the beam balances: where is that? Drag a stack to change how much it counts, and type a grade to try.

      homework 80, midterm 90, final 705060708090100?
      Your functionfinal_grade(scores, weights)
      scoresone per piece of work, e.g. [80, 90, 70]e.g. [85, 85, 85]
      weightshow much each one counts, e.g. [20, 30, 50]e.g. [20, 30, 50]
      returnsone final grade
      solution.pyLoading Python
      Sign in for an AI hint
      ← The billionaireAverage growth →