0
The list code needs to receive 5 five numbers in reverse order, my code does it only that my code needs the 2nd number entered to be multiplied by 3 and the 4th number to be added by 5 (remembering that there is indexing by zero so it is element 0, 1, 2, 3 and 4).
This part is just an example of the desired answer:
Entrada = [5, 15, 25, 35, 45]
Saída = [50, 35, 25, 45, 5]
For now my code is like this (shows the inverted elements):
elements = input("Enter only 5 numbers: ")
list = elements.split()
inverse_list = list[::-1]
print (inverse_list)
You’re adding 5 to the 5th number.
– Lorenzo Moulin
But that’s exactly it, remember that the 5th number will be the 4th number and the 1st number will be the 0º number
– user141036
Because of the very common zero indexing in programming languages, understand?
– user141036
Remembering that the list will display the result in reverse order
– user141036
And how you tried to multiply/add the values?
– Woss
That’s the problem, I can’t select the element and add/multiply it.
– user141036