# There seems a mistake in W2 code example

**URL:** <https://community.deeplearning.ai/t/there-seems-a-mistake-in-w2-code-example/887403>\
**Category:** Probability & Statistics for Machine Learning &...\
**Tags:** week-module-2, dl-ai-learning-platform\
**Created:** [January 19, 2026, 3:23pm UTC](https://community.deeplearning.ai/t/there-seems-a-mistake-in-w2-code-example/887403 "2026-01-19T15:23:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shicb](https://avatars.discourse-cdn.com/v4/letter/s/898d66/32.png) [@shicb](https://community.deeplearning.ai/u/shicb)\
**Post date:** [January 19, 2026, 3:23pm UTC](https://community.deeplearning.ai/t/there-seems-a-mistake-in-w2-code-example/887403/1 "2026-01-19T15:23:42Z")

</div>

![image](https://global.discourse-cdn.com/dlai/original/3X/0/3/0312d63057705843d591d01dc32d0e54ccb4fbe4.png)The ‘rolls’ circled should be “sum\_of\_rolls”, in my opinion.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [January 19, 2026, 5:49pm UTC](https://community.deeplearning.ai/t/there-seems-a-mistake-in-w2-code-example/887403/2 "2026-01-19T17:49:19Z")

</div>

Please give the name of the notebook file. I cannot find where this code is in the course.

---

<div class="post-metadata">

**Author:** ![TMosh](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/tmosh/32/9321_2.png) [@TMosh](https://community.deeplearning.ai/u/TMosh)\
**Post date:** [January 19, 2026, 5:58pm UTC](https://community.deeplearning.ai/t/there-seems-a-mistake-in-w2-code-example/887403/3 "2026-01-19T17:58:11Z")

</div>

I think I found it:

 ![image](https://global.discourse-cdn.com/dlai/original/3X/d/f/df27f3649868d4b58250bc20ccdc5901e9321540.png)

It’s buried in the “Loaded Dice” programming assignment of C3 W2.

You are correct, that variable should be “sum\_of\_rolls”. It is correct in the original version of this course on Coursera, but it is incorrect in the DL.AI Learning Platform version.

I’ll notify the course staff.
