sentinel_min_max Python 3.x request: Thanks for any assistance!
Write a sentinel loop that repeatedly prompts the user to enter a number and, once the number -1 is typed, displays the maximum and minimum numbers that the user entered. Here is a sample dialogue:
Type a number (or -1 to stop): 5 Type a number (or -1 to stop): 2 Type a number (or -1 to stop): 17 Type a number (or -1 to stop): 8 Type a number (or -1 to stop): -1 Maximum was 17 Minimum was 2
This exercise asks for bare code. Submit a fragment of Python code as described. Do not write any class or function/method heading around your code; just write the lines of code that will produce the result described.
Solution is provided below. Please comment if any doubt.
Python screen shot:

Python Code:
# Declare variable num
num=0
# Initialize list
lst=[]
#while num not equal to -1
while num!=-1:
# Enter the number
num=int(input("Type a number (or -1 to stop): "))
# if number is not equal to -1
if num!=-1:
# Append the number to lisr
lst.append(num)
# Find maximum of the list
print("Maximum was %d"%max(lst))
# Find minimum of list
print("Minimum was %d"%min(lst))
Output:

sentinel_min_max Python 3.x request: Thanks for any assistance! Write a sentinel loop that repeatedly prompts the...