Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
image text in transcribed
image text in transcribed
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

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

Step: 3

blur-text-image

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

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

3. How has e-commerce transformed marketing?

Answered: 1 week ago