csev/py4e

Small typo issue in quiz of chapter 10

dimitribarbot opened this issue · 1 comments

Dear Chuck,

I guess there is a small typo issue in question 4 of the quiz of chapter 10 where some backslashes are displayed whereas it should not, right ?

What we have:

x = \{ 'chuck' : 1 , 'fred' : 42, 'jan': 100\}
y = x.items()

What we should have:

x = { 'chuck' : 1 , 'fred' : 42, 'jan': 100 }
y = x.items()

The same issue appears in question 9.

What we have:

c = \{'a':10, 'b':1, 'c':22\}
for k, v in c.items() :
    ...

What we should have:

c = {'a':10, 'b':1, 'c':22}
for k, v in c.items() :
    ...

I suppose every student should understand these are typo issues but just to let you know.

Maybe it's already fixed.

If the question numbering changes, please copy the question text as well, it helps. Thanks.
Section 11 Tuples, https://www.py4e.com/lessons/tuples

I don't see the \ in Chrome Version 111.0.5563.65 (Official Build) (64-bit), Win 11 22H2 x64

Q4
In the following Python code, what will end up in the variable y?

x = { 'chuck' : 1 , 'fred' : 42, 'jan': 100}
y = x.items()
Q9
In the following Python loop, why are there two iteration variables (k and v)?

c = {'a':10, 'b':1, 'c':22}
for k, v in c.items() :
...

It's also okay on Coursera, course 2 week 6, https://www.coursera.org/learn/python-data/exam/6ab9s/chapter-10-quiz/attempt