Ask Question
26 March, 12:52

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]: ")

+1
Answers (1)
  1. 26 March, 13:25
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers