Python for Everybody 5.2 assignment - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Python for Everybody 5.2 assignment (/thread-5498.html) |
RE: Python for Everybody 5.2 assignment - gracePython3 - Apr-07-2020 if smallest is None: smallest = num elif num < smallest: smallest = num if largest is None: largest=num elif num > largest: largest = num then it works. RE: Python for Everybody 5.2 assignment - Saikumar - Apr-16-2020 (Oct-07-2017, 04:56 PM)Lux Wrote: Well, the line
RE: Python for Everybody 5.2 assignment - pyzyx3qwerty - Apr-16-2020 (Apr-16-2020, 12:05 PM)caseyfloyd6 Wrote: Removed spam contentIs this supposed to help with the question? It is interesting, but how about you post it as a thread in the News and Discussions bar? RE: Python for Everybody 5.2 assignment - Saikumar - Apr-18-2020 (Apr-07-2020, 05:37 AM)vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultBro plss help me for 3.3 assignment RE: Python for Everybody 5.2 assignment - ShehryarJoyia - Apr-19-2020 (Oct-07-2017, 03:58 PM)baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please. # check out this code largest = None smallest = None while True: inp = raw_input("Enter a number: ") if inp == "done" : break try: num = int(inp) except: print ("Invalid input") if smallest is None: smallest = num elif num < smallest: smallest = num elif num > largest: largest = num continue print ("Maximum is", largest) print ("Minimum is", smallest) RE: Python for Everybody 5.2 assignment - pyzyx3qwerty - Apr-20-2020 Quote:check out this codeFirst of all, this is the HOMEWORK SECTION, you aren't SUPPOSED TO WRITE CODE FOR OTHERS. And, second, even if you write code, please use proper code tags RE: Python for Everybody 5.2 assignment - Helious10 - Apr-25-2020 (Oct-07-2017, 03:58 PM)baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please. TRY THIS CODE: largest = None smallest = None while True: try: num = 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") continue print ("Maximum is", largest) print ("Minimum is", smallest) RE: Python for Everybody 5.2 assignment - pyzyx3qwerty - May-31-2020 (Apr-07-2020, 05:37 AM)vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultTo ask another question, start a new thread , DON'T POST IN ANOTHER THREAD WRITTEN BY ANOTHER USER (Apr-07-2020, 07:10 AM)gracePython3 Wrote: if smallest is None:Please don't post you solution, this is the homework section. And also, if you post codes in future, please use proper code tags (Apr-18-2020, 04:40 AM)Saikumar Wrote:You need help in an assignment, post another thread, specifying all needs and requirements(Apr-07-2020, 05:37 AM)vis1999 Wrote: please, solve my problem, when i put the term in output block(7,2,bob,10,2)again it ask enter a num and not show the resultBro plss help me for 3.3 assignment (Apr-25-2020, 04:04 PM)Helious10 Wrote:Please don't post you solution, this is the homework section. And also, if you post codes in future, please use proper code tags(Oct-07-2017, 03:58 PM)baba04201 Wrote: Hey guys- I'm on my last assignment for Python and I need some expert assistance please. (May-30-2020, 09:29 PM)sanjaykumar11 Wrote: I have upload python assignment 5.2 full solution in the videoPlease, start another thread for this. It would also be preferred if you didn't show this, as students need to solve assignments on their own RE: Python for Everybody 5.2 assignment - rafaelmoreno1 - Jun-29-2020 hello cheakout man numList = [] while True: try: num = input("Enter a number: ") if num == 'done': break n = int(num) if n != 'done': Value = n numList.append(Value) smallest = min(numList) largest = max(numList) except: print("Invalid input") continue print("Maximum is", largest) print("Minimum is", smallest) RE: Python for Everybody 5.2 assignment - pyzyx3qwerty - Jun-29-2020 (Jun-29-2020, 02:02 AM)rafaelmoreno1 Wrote: hello cheakout man That's very good, but please don't post unnecessary stuff on a thread when a person is asking a question. If you want to show this, post it probably in the board/bar section. |