Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

stamapare una colonna

9
9Andrea9 (12340 points)
12 32 56
in Programmare in Python by (12.3k points)
recategorized by

Salve a tutti vorrei capire come stampare se possibile un intera colonna, tenendo conto che :

-nome matrice:     img

-nome righe:       e

-nomi colonne:     k

ho provato a stampare la prima colonna in questo modo :

                img   [ e : ][ 0 ]

nel primo file mi stampa valori differenti dal (0,0,0) anche se la colonna è interamente composta da pixel vuoti.

197 views
closed

1 Answer

Best answer
j
jiangler (1530 points)
0 0 1
by (1.5k points)
selected by
Secondo me, potresti fare così:

for i in range(y,y+l): img[i][x] = c

l è lunghezza di y