Translate the following pseudocode for finding the minimum value from a set of inputs into a Python program.
Set a Boolean variable "first" to true.
While another value has been read successfully
If first is true
Set the minimum to the value.
Set first to false.
Else if the value is less than the minimum
Set the minimum to the value.
Print the minimum.
first = True minimum = None n = input("Enter input: ") while(n!=''): value = int(n) if(first): minimum = value first = False else: if(minimum > value): minimum = value n = input("Enter input: ") print(minimum)
Get Answers For Free
Most questions answered within 1 hours.