Graded Exercise 1 - grades and solution

Graded Exercise 1 - grades and solution

by Benoît Guillard -
Number of replies: 1

Dear students,
The scores of the first graded exercise have been uploaded to Moodle. We also provide a solution here.
You performed well, with an average mark of 83.9/100.

Some common issues that we found are:

  • len(matrix) and matrix.shape are not equivalent:

import numpy as np
a = np.zeros((10, 5))
print(len(a)) # number of rows
# 10
print(a.size) # total number of parameters
# 50
print(np.prod(a.shape)) # number of rows * columns
# 50

  • Please avoid leaving long debug prints in your submission.
  • Avoid naming variables with python reserved expressions like "len" or "sum".


Best regards,
Benoit

In reply to Benoît Guillard

Re: Graded Exercise 1 - grades and solution

by Benoît Guillard -
Just to clear up some confusion from a few emails I've received: Your grades can be found in the "Grades" section of the course, which is located here, rather than with the submission file.
Best,
Benoit