Python Forum
finding the minimum value out of a set of inputs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding the minimum value out of a set of inputs
#2
The reason your loop goes on forever is that you never change either string or i in the loop. So the condition in the while statement never changes.

pseudocode Wrote:While another value has been read successfully

This says to me that you want to get a new input each time through the loop. But you don't have an input inside the loop. You need one inside the loop, so you have a changing value for your while condition. However, it seems from the question in the input that the while condition should be looking for -1. I think the pseudocode it talking about this kind of structure:

answer = input('Keep going? ')
while answer != 'no':
    print('okay')
    answer = input(Keep going? ')
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
RE: finding the minimum value out of a set of inputs - by ichabod801 - Oct-30-2018, 01:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to collect all integers with minimum number of rounds? meknowsnothing 6 3,295 Jun-11-2019, 08:36 PM
Last Post: jefsummers
  Storing Minimum List of values from a recursive function sigsegv22 1 2,547 Sep-10-2018, 01:25 PM
Last Post: ichabod801
  maximum and minimum element from the list and return output in dict MeeranRizvi 1 3,749 Jan-02-2017, 02:12 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020