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

                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 337 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,850 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,340 points
+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 219,580 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
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
+1 vote
1 answer
+1 vote
10 answers

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

Just for the record: >>> int('55063.000000') Traceback (most recent ...READ MORE

answered Aug 17, 2020 in Python by pakainfo
• 200 points
Send OTP
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP