Question: Python Activity We will pass in a list of numbers. Your job is to find the largest number in that list and output its index

Python Activity

We will pass in a list of numbers. Your job is to find the largest number in that list and output its index, not the actual value.

Tip: you will need to use a utility 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.

------------------------------------------------------ 

Required Program Output

Program Failed for Input: 1,5,8,23,78,22,0 Expected Output: 4 ------------------------------------------------------

# Get our numbers from the command line import sys numbers= sys.argv[1].split(',') numbers= [int(i) for i in numbers]

# Your code goes here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!