1. Engineering
  2. Computer Science
  3. can someone help...

Question: can someone help...

Question details
Can someone help
을 codio.com nli Annou learn-snhu Mail-dam Mail-dam GOOD EXP Codio Proj 을 Codio.c C Codio-... 4 N- int (sys.argv[2]) We will pass you 2 inputs e an list of numbers e a number, N, to look for # Convert the list of strings into integers 7 numbers 8for i in sys.argv[1.split(,): if(.isdigit)): 10 numbers. append ( int ( 1) ) numbers now contains the list of integers 12 13 14 15 16 17 for j in range ,N): 18 19 Your job is to loop through the list and find the number specified in the second input. Output the list element index where you find the number Write your code below #0 f C3 print (N) If N is not found in the list, output-1 Tip: Remember the break
a codio.com nli Annou learn-snhu Mail-dam Mail-dam GOOD EXP Codio Proj 을 Codio.c C Codio-... 4 N- int (sys.argv[2]) # Convert the list of strings into integers 7 numbers 8for i in sys.argv[1.split(,): If N is not found in the list output -1. if(.isdigit)): Tip: Remember the brealk statement? It exits the loop. You can (but dont have to) use this 10 numbers. append ( int ( 1) ) numbers now contains the list of integers 12 13 14 15 16 17 for j in range ,N): 18 19 Write your code below #0 f C3 LAST RUNn print (N) 282019 526 06 PM Program Output
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution