Hello, well well, I'm all new with Python, actually I've heard of it for the first time 2 or 3months ago...
I have to do a project for my class (I'm not even in Computer Sciences)and I need some help...
I start to be familiar with different expressions of the Python language, but I still don't have the Informatician logic...
my program is not ready yet,I still need to add a few things but it doesn't work...(maybe it's normal, but as I told you, I don't understand Python!!:( ) I don't know if you can already tell what's the problem with it by looking at it, or I should specify "my task"...
Thanks a lot, and here it goes:
>>> def create_list(size):
my_list=[]
for i in range(size):
my_list.append(0)
return my_list
>>> def create_matrix(rows,colomns):
matrix=[]
for i in range(rows):
matrix.append(create_list(colomns))
return matrix
# add a colomn of 0
>>>for j in range(len(my_list)):
row = my_list[j]
row.append(0)
# Add a row of 0
>>>for i in range(len(my_list)):
colomn=my_list[i]
colomn.append(0)
# fix : z=1
>>> matrix[rows][colomns-2]=1
>>> matrix[rows][colomns-1]=1
>>> def search_pivot(matrix,rows,colomns):
pivot=0
for k in range(rows):
if valeur_absolue(matrix[k][colomns]>valeur_absolue(pivot):
pivot=matrix[k][colomns]
return pivot