Hey Does anybody know how to fix the unexpected indent error

0 votes
My Code:
user_message = input("Hello and Welcome to PokeThree, Please use the p/help command for a list of commands. ")
if user_message == str("p/help") :
    print("Here are some of the Commands:"
          "p/help"
          "p/start"
          "p/pokemon"
          "p/info"
          "p/shop"
          "p/buy ")
elif user_message == str("p/start"):
    starter_pokemon  = input("Here are your Starter Pokemon Options:"
                              "1.Charmander "
                             "2.Sqirtle "
                             "3.Bulbasaur ")
    if starter_pokemon == str("1") :
        print("Congratulations! You Chose The Lizard Pokemon Charmander! Please Use the p/info command to see your Charmander's stats.")
        pokemon = starter_pokemon
        if starter_pokemon == str("2") :
            print("Congratulations! You Chose The Water Pokemon Sqirtle! Please Use the p/info command to see your Sqirtle's stats.")
            (here is the problem)pokemon: str = starter_pokemon 
            if starter_pokemon == str("3"):
                print(
                    "Congratulations! You Chose The Vine Pokemon Bulbasaur! Please Use the p/info command to see your Bulbasaur's stats.")
                    pokemon = starter_pokemon
                elif user_message == str("p/pokemon"):
                    pokemon = pokemon + starter_pokemon
                    print("your starter:")
                    print(starter_pokemon)
                    breakpoint()
                    print("your other pokemon:")
                    print(pokemon)   
Dec 27, 2020 in Python by Aarohan
• 130 points
519 views

1 answer to this question.

0 votes

Hello, @Aarohan,

As the error message indicates, you have an unexpected indent error. This error occurs when a statement is unnecessarily indented or its indentation does not match the indentation of former statements in the same block. Python not only insists on indentation, it insists on consistent indentation 

For more details, you can have a look at this: https://www.edureka.co/community/50861/how-do-i-resolve-the-unexpected-indent-error-in-python#:~:text=As%20the%20error%20message%20indicates,it%20insists%20on%20consistent%20indentation%20.

answered Dec 28, 2020 by Gitika
• 65,770 points

Related Questions In Python

0 votes
1 answer
0 votes
0 answers

how to fix the ERROR: Could not find a version that satisfies the requirement engine

when I install engine or anyother module ...READ MORE

Jan 3, 2021 in Python by Muhammad Ali
• 120 points
2,021 views
0 votes
1 answer

How does Python know whether a variable in the class is a method or a variable?

In python objects/variables are wrapped into methods ...READ MORE

answered Sep 18, 2018 in Python by aryya
• 7,460 points
1,172 views
0 votes
1 answer

How to print a message or the error if a file is not found?

To print the message that file is not ...READ MORE

answered Jan 2, 2019 in Python by Omkar
• 69,220 points
2,870 views
0 votes
1 answer

How to resolve the error while importing cv2 from openCV in python?

I would recommend you go with anaconda ...READ MORE

answered Jul 31, 2019 in Python by Mohammad
• 3,230 points
1,995 views
0 votes
2 answers

How to solve the error - ssl module not found?

Hey, @There, nstall the necessary packages for Python ...READ MORE

answered Oct 23, 2020 in Python by Gitika
• 65,770 points
2,466 views
+1 vote
0 answers

Error :tile cannot extend outside the image .How to save patches without this error.

def nodule_detect(nodules,j,numpyImage, numpyOrigin, numpySpacing): ...READ MORE

Jan 28, 2020 in Python by anonymous
• 150 points
1,764 views
0 votes
1 answer

how to solve the error : "ImportError: No module named Tkinter" in python.

Hi@Umama, If you are using Linux system, then ...READ MORE

answered Apr 27, 2020 in Python by MD
• 95,460 points
13,463 views
+1 vote
4 answers

How do i resolve the "unexpected indent" error in python?

Look for the whitespaces which are not ...READ MORE

answered Aug 2, 2019 in Python by Mohammad
• 3,230 points
137,478 views
+2 votes
10 answers

How to fix this? ValueError: invalid literal for int() with base 10 error in Python

The following are totally acceptable in python: passing ...READ MORE

answered Nov 16, 2018 in Python by Nymeria
• 3,560 points
409,263 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP