Python Forum
elif not responding on print
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
elif not responding on print
#2
The order was right, but your comparison is greater than, so the number must be bigger.
Changed the operator to greater equal than.

while True:
    grade = int(input("Enter the Grade: "))

    if grade >= 90:
        print("You Got an AA! Congrats!")
    elif grade >= 85:
        print("You Got an BA! Congrats!")
    elif grade >= 80:
        print("You Got an BB! Congrats!")
    elif grade >= 75:
        print("You Got an CB! Congrats!")
The while True loop is just for easier testing.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
elif not responding on print - by EddieG - Jul-20-2023, 09:18 AM
RE: elif not responding on print - by DeaD_EyE - Jul-20-2023, 09:51 AM
RE: elif not responding on print - by deanhystad - Jul-20-2023, 05:37 PM
RE: elif not responding on print - by Pedroski55 - Jul-20-2023, 09:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Pygame Rect Not Responding SomebodyImportant 1 1,612 May-02-2021, 01:27 PM
Last Post: BashBedlam
  IDLE stops responding upon saving tompi1 2 1,988 Oct-01-2020, 05:44 PM
Last Post: Larz60+
  Code is not responding abhishek81py 0 1,521 Jul-07-2020, 12:40 PM
Last Post: abhishek81py
  Sublime text not responding Mat 1 2,014 Mar-23-2020, 11:42 AM
Last Post: Fre3k
  IDLE not responding (Mac) Selinal 1 3,014 Aug-05-2019, 10:27 PM
Last Post: Larz60+
  Whats the right way to refactor this Big if/elif/elif ? pitosalas 1 2,290 Jul-28-2019, 05:52 PM
Last Post: ichabod801
  Client Server Game Pygame not responding Damien 2 3,206 Aug-04-2018, 06:19 PM
Last Post: micseydel
  Discord bot not responding to command [New User] Alabaster 0 3,430 May-20-2018, 06:34 PM
Last Post: Alabaster
  [Discord.py] Bot not responding? Ouindoze 2 10,159 Oct-10-2017, 01:35 AM
Last Post: Ouindoze

Forum Jump:

User Panel Messages

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