Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Matemática entre itens de duas listas sem substituição de Item repetido

85 views
Skip to first unread message

Luiz Henrique Lima

unread,
Dec 26, 2019, 3:27:02 PM12/26/19
to MIT App Inventor Forum
Olá amigos, Há algum tempo o TIM me ajudou com o código onde os itens de duas listas se multiplicam entre linhas ( List_1 x List_2) usando " for each item". Entretanto, quando os itens (números) se repetiam na coluna da List_1, os números da mesma linha da List_2 eram substituídos causando erro no resultado da multiplicação. No dia 18 deste mês o ABG me sugeriu utilizar " for each number", mas o erro continua. Alguém poderia me passar o código de como fazer Operações matemáticas entra duas listas seguindo exatamente os dados constantes nas mesmas?

Image1.PNG

Image2.PNG



Multiply.aia
Image1.PNG
Image2.PNG

Chris Ward

unread,
Dec 26, 2019, 5:57:33 PM12/26/19
to MIT App Inventor Forum
Hi Luiz

Some how you have over-complicated the code that collects the values from the Lists. Although in this case it doesn't matter, it is always best to use number blocks for numbers.

MultiplyRows.png




Multiply_v2.aia

Luiz Henrique Lima

unread,
Jan 4, 2020, 12:42:47 PM1/4/20
to MIT App Inventor Forum
Obrigado Chris!! Da forma simplificada que  informou deu tudo certo..

TimAI2

unread,
Jan 4, 2020, 1:44:07 PM1/4/20
to MIT App Inventor Forum
We are moving!
For future questions please sign up and use the new community here:
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages