Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
another problem :)
#18
I have been working on this way too long and I am sure I am overthinking it. No matter how many times I read the text, you guys attached in regards to "float" and "list highest and lowest " I just can't get it. The wording is just too technical. Can I get some more simplified instruction or hint? I am not wanting anyone to do the homework for me, that is not what I have ever asked. Below is the code I have so far. I think out of all the instructions I have everything complete except adding the float number and however instructor wants the #4 option to work, which should print out as follows: highest score: xxxx lowest score: xxxx

Line 32 is where I was trying to make the highest and lowest work
starting line 24 is where i need to put my float number i think

menu = """
1: Enter to exit
2: List scores so far
3: Add a score
4: Display the highest and lowest scores
"""
scores = [ 85.3, 85.2, 21.99 ] 
done = False

while not done:
    print (menu)
    try:

        selection = input ("Please enter menu item 1-4: ")
        if selection == "1":
            done = True
            print("Thank you for using The score engine")

        elif selection == "2":
            print("Scores recorded so far:")
            scores.sort()
            print(*scores, sep = "\n")
            
        elif selection == "3":
            input("Please enter a score you would like to add to the list from 1-100: ")

        elif selection == "4":
            print("Score engine highest to lowest:")
            scores.sort(reverse)
            #print("Highest score:", max(scores), "Lowest score:", min(scores))
            #print(*scores, sep = "\n")
            print('Highest score:, Lowest score:)
        else:
            print("{} is not a valid entry".format(selection))
            print()
    except ValueError:
        print("Please enter a valid input! ")
        
Reply


Messages In This Thread
another problem :) - by raymond2688 - Aug-02-2019, 06:02 PM
RE: another problem :) - by Yoriz - Aug-02-2019, 06:15 PM
RE: another problem :) - by raymond2688 - Aug-02-2019, 07:08 PM
RE: another problem :) - by ichabod801 - Aug-02-2019, 06:29 PM
RE: another problem :) - by Yoriz - Aug-02-2019, 07:16 PM
RE: another problem :) - by raymond2688 - Aug-02-2019, 07:42 PM
RE: another problem :) - by Yoriz - Aug-02-2019, 07:47 PM
RE: another problem :) - by ichabod801 - Aug-02-2019, 08:02 PM
RE: another problem :) - by raymond2688 - Aug-02-2019, 09:15 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 01:42 PM
RE: another problem :) - by ichabod801 - Aug-03-2019, 02:09 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 02:42 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 02:15 PM
RE: another problem :) - by ThomasL - Aug-03-2019, 02:38 PM
RE: another problem :) - by ichabod801 - Aug-03-2019, 03:35 PM
RE: another problem :) - by Yoriz - Aug-03-2019, 03:42 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 05:23 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 08:32 PM
RE: another problem :) - by ichabod801 - Aug-03-2019, 09:03 PM
RE: another problem :) - by raymond2688 - Aug-03-2019, 10:21 PM
RE: another problem :) - by ichabod801 - Aug-03-2019, 10:28 PM
RE: another problem :) - by raymond2688 - Aug-04-2019, 08:26 PM
RE: another problem :) - by ichabod801 - Aug-04-2019, 09:08 PM
RE: another problem :) - by raymond2688 - Aug-05-2019, 01:18 AM
RE: another problem :) - by ichabod801 - Aug-05-2019, 01:41 AM
RE: another problem :) - by raymond2688 - Aug-05-2019, 02:16 AM
RE: another problem :) - by ichabod801 - Aug-05-2019, 01:37 PM
RE: another problem :) - by raymond2688 - Aug-05-2019, 03:38 PM
RE: another problem :) - by anagarcia - Aug-22-2019, 10:02 AM

Forum Jump:

User Panel Messages

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