Python Forum

Full Version: [split] Python for Everybody 5.2 assignment
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need help too
What do I type in the box when it appears?
[Image: 491467811.png]
Split from https://python-forum.io/Thread-Python-fo...assignment

As to your question - I imagine it's happening because of your input() call (which we can't see, but I suspect is there - always provide your code!). The question description says what to put.
largest = None
smallest = None
while True:
    try:
        num = raw_input("Enter a number: ")
        if num == "done" : 
             break
        num = int(num)
        if largest is None or largest < num:
            largest = num
        elif smallest is None or smallest >  num:
             smallest = num
    except ValueError:
        print("Invalid input")
    
print("Maximum is", largest)
print("Minimum is", smallest)
this is code
(Jan-05-2019, 12:12 AM)ramadan2099 Wrote: [ -> ]I need help too
What do I type in the box when it appears?
[Image: 491467811.png]