Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: what am I doing wrong?
Post: RE: what am I doing wrong?

eh, I already sent the assignment. We'll see how it goes
imamy Homework 10 4,349 Nov-12-2018, 10:56 PM
    Thread: Average of lists
Post: RE: Average of lists

I would save the output as float later on in the code for example where you count average but I'm just a beginner Isn't there a syntax error in the first line? Why is there : ? Did you get the first ...
imamy Homework 3 2,554 Nov-11-2018, 06:37 PM
    Thread: what am I doing wrong?
Post: RE: what am I doing wrong?

ok I did it in a different way. After doing everything I reversed the order of element on row def rotate_matrix(matrix): result = [] for i in range(len(matrix)): row=[] for j ...
imamy Homework 10 4,349 Nov-11-2018, 05:22 PM
    Thread: what am I doing wrong?
Post: RE: what am I doing wrong?

my idea was:to iterate by elements of the lists (which are here sublists) from the last one to the first one (range (start, stop, step) ) from each of them to take the first element and add it to new...
imamy Homework 10 4,349 Nov-11-2018, 12:18 AM
    Thread: what am I doing wrong?
Post: RE: what am I doing wrong?

I see the first mistake - do you know how to implement len() of sublists? how about now? could you give me any tips? def rotate_matrix(l): result = [] for m in range(len(l)-1, len(l)-1, -1):...
imamy Homework 10 4,349 Nov-10-2018, 11:04 PM
    Thread: what am I doing wrong?
Post: RE: what am I doing wrong?

l=[[1,2,3],[4,5,6],[7,8,9]] def rotate_matrix(l): if len(l) < 4: print("list too short") else: result = [] for i in range(len(l) -1, -1, -1): row = [] ...
imamy Homework 10 4,349 Nov-08-2018, 05:57 PM
    Thread: what am I doing wrong?
Post: what am I doing wrong?

I have this assignment for my second class where I have to write a code that would rotate a matrix by 90* clockwise. I came up with the idea to iterate from the back on the sublists and create new sub...
imamy Homework 10 4,349 Nov-08-2018, 05:40 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020