I ve been trying to run this code but the error says Expected an indented block for the line word as list index guess

0 votes
else:

                print("Good job,", guess, "is in the word!")

                guessed_letters.append (guess)

                word_as_list = list(word_completion)

                indicates = [i for i, letter in enumerate(word) if letter == guess]

                for index in indices:

                word_as_list[index] = guess

                word_completion = "".join(word_as_list)

                if "_" not in word_completion:

                    guessed = True
Nov 21, 2020 in Python by paradox
• 120 points

edited Nov 21, 2020 by Gitika 444 views

1 answer to this question.

0 votes

Hi, @Paradox,

The error message IndentationError: expected an indented block would seem to indicate that you have an indentation error. It is probably caused by a mix of tabs and spaces. The indentation can be any consistent white space. 

answered Nov 21, 2020 by anonymous
• 65,890 points

Related Questions In Python

+2 votes
0 answers
0 votes
1 answer

I was written the python program, am getting error message "IndentationError: expected an indented block"

Hi@Thiyagarajan, You have one else block in your ...READ MORE

answered May 27, 2020 in Python by MD
• 95,380 points
2,838 views
+1 vote
3 answers

Python error "IndentationError: expected an indented block"

Python requires its code to be indented ...READ MORE

answered Jun 17, 2019 in Python by Varun

edited Jun 17, 2019 274,230 views
0 votes
1 answer

i write this python to read dataset into panda data frame but im getting NameError: name 'true' is not defined. Below is the code:

change  def parse(path):   g = gz ...READ MORE

answered Mar 15, 2020 in Python by Abhishek Shingadiya
2,211 views
0 votes
0 answers

Struck to do an application on amazon price tracking

Sir I want to do an application ...READ MORE

Apr 7, 2020 in Selenium by Likhitha
• 120 points
267 views
+1 vote
1 answer
+1 vote
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
378,495 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