Question: i am getting the answer wrong. please help me. thank you 5. 12 LAB: Nth from end (MCC) Write a program that reads a list

i am getting the answer wrong. please help me. thank you  i am getting the answer wrong. please help me. thank you
5. 12 LAB: Nth from end (MCC) Write a program that reads
a list of positive integers followed by a negative integer from input

5. 12 LAB: Nth from end (MCC) Write a program that reads a list of positive integers followed by a negative integer from input and outputs the Nth number from the end of the list. Convert the negative integer read at the end to positive and use as N. Output the negative integer read at the end if the size of the list is smaller than N. Ex. If the input is 135975 the output is: 9 Ex. If the input is: the cutput is: main.py When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Coding trail of your work What is this? 1/18W0,0,00,0,0,0F0,0,0,0,0=0,0,0,00,0,0min:15 Latest submission - 10:06 PM PST on 01/27/23 Total score; 0/10 Only show failing tests. Download this submission number = int (input ("Enter a number (negative number to end input): ")) EOFError: EOE when reading a 1 ine Output differs See highlights below input Your output Expected output 2. Compareouiput Traceback (most recent call last): File "main.py", line 11, in \{modules number = int (input ("Enter a number. (negative number to end input): ")) BOFError: EOF when reading a line

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!