Python Forum
Unexpected input within an if/elif statement
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unexpected input within an if/elif statement
#1
While trying to implement a simple if/elif statement, I'm getting an assault of errors that I don't understand. Hopefully, you will read my code and tell me what I'm doing wrong, I think I'm missing something basic. I have a function called "Stats" that displays the user's stats. By choosing an advantage that user can upgrade one of the three stats (health, power, luck).
if advantage == 1:
    BaseHealth = 150
Stats()

elif advantage = 2:
BaseLuck = 150
Stats()

elif advantage == 3:
BasePower = 150
Stats()
Thanks for your time
Reply


Messages In This Thread
Unexpected input within an if/elif statement - by fier259 - May-12-2018, 03:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question If, elif, and else statement not working PickleScripts 3 934 Mar-30-2023, 02:53 PM
Last Post: PickleScripts
  Error in Using INPUT statement gunwaba 1 2,118 Jul-03-2022, 10:22 PM
Last Post: deanhystad
  If elif else statement not functioning SamDiggityDog 4 2,677 Jun-03-2020, 12:27 AM
Last Post: SamDiggityDog
  Proper use of if..elif..else statement nick1941 2 2,438 Mar-06-2020, 11:22 PM
Last Post: nick1941
  Using Input() in If...Elif Statements Shemira 11 7,942 Nov-24-2019, 06:57 AM
Last Post: perfringo
  Syntax Error (elif statement) Kanashi 0 3,692 Nov-20-2019, 11:29 PM
Last Post: Kanashi
  If Else Statement with User Input CalPark16 1 2,705 Sep-19-2019, 06:54 PM
Last Post: Axel_Erfurt
  Unexpected output: if statement CabbageMan 1 1,787 Sep-04-2019, 04:12 PM
Last Post: ThomasL
  Whats the right way to refactor this Big if/elif/elif ? pitosalas 1 2,269 Jul-28-2019, 05:52 PM
Last Post: ichabod801
  Problem with elif statement Haddal99 2 2,307 May-20-2019, 09:26 AM
Last Post: avorane

Forum Jump:

User Panel Messages

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