Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
3D matrix help
Post Body

Hello,

I'm trying to write a program that takes students' marks (A) as an argument (for instance [[1,2,3],[4,5,6],[7,8,9]]) and i as an index value you wish to use.

I wish to create another list called "student names", and i'll have it add names until you write "done" or "Done", and then have the code remove either of those two.

after which, I want to add one name from studentlist to each "part of the table" e.g. if student names = [a,b,c,] then if i'm successful, i want my list in a list to say [a,1,2,3],[b,1,2,3]. after which it then works out the averages of each list in A and prints out "a has an average of 2 marks" or something.

https://pastebin.com/hvu48uT1 this is what i've done so far (it's still sort of a work in process, sort of messy but i tried labelling where i can)

now my two issues is that line 17-30 doesn't remove 'done' or 'Done' from the code, leaving it in, and also that I get a "line 50, in schooltable y.extend(x) AttributeError: 'int' object has no attribute 'extend'" error at that point.

(also am I taking a really complex method of doing this task?) help would be appreciated, thank you :)

Author
Account Strength
100%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
9,206
Link Karma
84
Comment Karma
9,059
Profile updated: 3 days ago
Posts updated: 3 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago