1. Engineering
  2. Computer Science
  3. i dont understand how this is wrong...

Question: i dont understand how this is wrong...

Question details
I don’t understand how this is wrong.

ile E Fnd Vew Tools Education Hep Configure..Project Index (static) Confiqure.. 3. 5. Max nu...x # Get our numbers from the command line CollapseChallenges import sys numbers sys.argv[1.split() numbers int() for i in numbers] 3. 5. Max number ve wi pass in a ist or numoers rour joo is to ina the largest number in that hst and output its index not the actual value s Your code goes here maxi 0 Tip: you will need to use a ubility variable to store the maximum value and a decision to see if each number is bigger than the current maximum value encountered in previous iterations for i in range (Len (numbers)): if numbers-numbers[maxi]: maxi:i print(maxi) Program Output Program Faled for input 11 Expected Output o Yeur Program Output
ile Fnd Vew Tools Education Hep Configure..Project Index (static) Confiqure.. 3. 5. Max nu...x # Get our numbers from the command line CollapseChellenges import sys numbers sys.argv[1.split( numbers- int() for i in numbers] 3. 5. Max number vve wil pass in a ist or numoers rour joo is to ing the largest number in that hist and output its index not the actual value # Your code goes here maxi 0 Tip: you will need to use a ubility variable to store the maximum value and a decision to see if each number is bigger than the current maximum value encountered in previous iterations for i in range (Len(numbers)) if numbers numbers [maxi print(maxi) Program Output Program Fale For Input 1 Expected Output Your Poram Output
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution