🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Gradient Descent: all 10 questions

Quiz: Gradient Descent · Question 8 of 10

What does this print? (code)

What does this print?

w, lr, grad = 4.0, 0.1, 10.0
w -= lr * grad
print(w)
  1. A.5.0
  2. B.4.0
  3. C.14.0
  4. D.3.0
Answer & explanation

Correct answer: 3.0

4.0 − 0.1 × 10.0 = 3.0.

Can you get the rest right without peeking?

Take the timed Quiz: Gradient Descent quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →