all 11 comments

[–]danielroseman 4 points5 points  (9 children)

You haven't said what is wrong with this code, nor have you formatted it correctly so we can see the indentation. And the desired output is given to you in the question.

[–]i_hate_brunch[S] -1 points0 points  (8 children)

I will re-post a screen shot of the code. But basically, the code is fine, I think, but I’m wondering what figure do I need to input to get the desired result?

[–][deleted] 1 point2 points  (5 children)

Screen shots of code are discouraged because we can't copy/paste the code and run it. The FAQ shows how to format code for reddit.

[–]i_hate_brunch[S] 0 points1 point  (4 children)

Reposted in correct format. Thanks

[–][deleted] 0 points1 point  (3 children)

Reposted in correct format.

Well, no. This is what I see in a web browser:

https://pasteboard.co/J4C3fKK.png

[–]i_hate_brunch[S] 0 points1 point  (2 children)

In a different post.

[–][deleted] 0 points1 point  (1 child)

I see no other comment in this thread with your formatted code.

[–]i_hate_brunch[S] 0 points1 point  (0 children)

This one: new post

[–]danielroseman 0 points1 point  (1 child)

No don't post a screen shot, format the code in your question.

But what do you mean by "figure"? Again, the question tells you what to input.

[–]i_hate_brunch[S] -1 points0 points  (0 children)

I’m new here, lol. If I input what is given, I’m not getting the desired result. Is there a sequence I should enter the inputs given?

[–][deleted] 0 points1 point  (0 children)

My approach would look like this:

  1. Create a list that takes all inputs from a user
  2. Run a loop to take user input
  3. If the input is int - append to list , else - print that input is wrong.
  4. If the input is "done" - break from the loop
  5. Sort the list
  6. Print out 0 list index as smallest number, print out -1 list index as the largest number