Talk:Non-Programmer's Tutorial for Python 3/Lists

test.py is a confusing example and could use more clarification.

First Example
I found that when typing out the first example that it was difficult to grasp that list numbered starting at 0 and not 1. This example made me think it does start at 1 because that's what kind of input it asks for (you type in 1 and get the first list item. I think the example is good and should stay, but perhaps it should include something that helps connect that the first list item starts at the number 0.

print('The first month is', months[0]) # note to beginner that it starts with 0 print('The second month is', months[1]) print('The third month is', months[2]) print('The fourth month is', months[3]) print('The fifth month is', months[4])

I just added that to my code after reading over the explanation a few times. Typing it up helped me connect the numbering of lists to the location of the months. - dannyfreeguy, a noob reading through this tutorial

Last Example
The last example actually gives out the percentage as a floating point number(with 14 digits after the decimal). Since the current code doesn't match the example output, it might be useful to change this:

print("You got", right * 100 / len(questions), \         "% right out of", len(questions))

to this:

print("You got", int(right * 100 / len(questions)), \         "% right out of", len(questions))

Either the code has to change or the example output has to change. This might provide another opportunity to explain the differences between integers and floating point numbers. I'm only a beginner myself, so I may be way off base. I hope this helps! -Randy

Code is too messy.
I think that very hard to understand code at "More features of lists" chapter should be divided into smaller chunks, each of them immediately followed by the output and an explanation. Otherwise it's just too many new functions introduced in succession for the "non-programmer". 194.15.124.5 (discuss) 23:35, 20 August 2012 (UTC)

I agree with this, and think it should be broken into smaller segments with more explanation for what each of the new functions do. This is coming from someone new to programming. The table with the columns 'example' and 'explanation' is out of place and hard to follow. I think the table could be removed if the "more feature" program were broken down and the explanations where put with the corresponding program that demonstrates their uses. I could attempt to fix this while I work through this exercise. - dannyfreeguy

A few too many leaps without enough explanation for a novice
There have been a few times in this wikibook where there's a jump forward in logic that wasn't sufficiently explained and I had to look elsewhere to wrap my head around.

This example is from the solution to the assigned problem in this section.

I think the book could use more explanation on how two dimensional lists like this work. I didn't understand from reading this chapter that in the following list A,B],[C,D],[E,F, the values are called as follows:

A = [0][0] B = [0][1] C = [1][0] D = [1][1] E = [2][0] F = [2][1]

This made it very difficult for me to solve this problem on my own as a non-programmer. Just something that should maybe be added going forward.

As mentioned, there are other examples like this that I may add to the discussion later.

Too much code in a single go
I believe that less code should be included in a block immediately followed by the output so that it is easier to read and comprehend. Mohibalvi (discuss • contribs) 16:04, 26 May 2024 (UTC)