Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me a codio.com Onlin Ma IT-140-J MAT-140 learn.snhu Mail-dam Mail-dam O Codio-... Codio Proj Codio.c # Get our input from the command

Can someone help me image text in transcribed
image text in transcribed
a codio.com Onlin Ma IT-140-J MAT-140 learn.snhu Mail-dam Mail-dam O Codio-... Codio Proj Codio.c # Get our input from the command line import sys 4 N int (sys.argv[2]) CollapseChallenges 3.4. Simple number search # Convert the list of strings into integers 7 numbers [] 8fori in sys.argv[1.split(",") if(i.isdigit)): 10 numbers. append( int ( 1) ) We will pass you 2 inputs # numbers now contains the list of integers 12 13 14 15 16 for i in range (0,100): 17 18 19- else: 20 e an list of numbers Write your code below e a number, N, to look for 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 while numbersN: print(N) print (-1) a codio.com Onlin Ma IT-140-J MAT-140 learn.snhu Mail-dam Mail-dam O Codio-... Codio Proj Codio.c # Get our input from the command line import sys 4 N int (sys.argv[2]) CollapseChallenges Program Failed for Input 1,3,11,42,12 42 Expected Output: 3 Your Program Output:-1 # Convert the list of strings into integers 7 numbers [] 8fori in sys.argv[1.split(",") if(i.isdigit)): 10 numbers. append( int ( 1) ) # numbers now contains the list of integers 12 13 14 15 16 for i in range (0,100): 17 18 19 else: 20 Write your code below while numbersN: Your output was incorrect. Try print(N) print (-1)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

Whats the difference between a media advisory and a fact sheet?

Answered: 1 week ago

Question

Why is linear programming useful in CPM crashing?

Answered: 1 week ago

Question

What roles have these individuals played in your life?

Answered: 1 week ago