Ask Question

This is on Python 3.3.2. It says "expected an indented block" when I run the program, what should I do? Here is the code

import random

play = 'y'

while play. lower () = = 'y':

print ("/nDid you win?")

fate = random. randint (0,3)

if fate = = 0:

print (" ... No!)

else:

print (" ... Yes!")

play = input ("Play again?[y/n]: ")

+4
Answers (1)
  1. 14 December, 17:45
    0
    You need to ident your code

    for instance:

    "

    if True:

    function ()

    "

    will error, whereas

    "

    if True:

    function ()

    "

    won't
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “This is on Python 3.3.2. It says "expected an indented block" when I run the program, what should I do? Here is the code import random play ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers