IndentationError expected an indented block

0 votes

I keep getting this error irrespective of all my effort in my code.

The code is as follows:

import numpy as np
import math
import random
PI = math.pi
class Grassfire:
START =  0
DEST  = -1
UNVIS = -2
OBST  = -3
PATH  = -4
COLOR_STARTN = np.array([0,0.75,0])
COLOR_DEST = np.array([0.75,0,0])
COLOR_VIS = np.array([0, 0.5, 1])
COLOR_UNVIS = np.array([1,1,1])
def random_ grid( self, rows=16, cols=16, obstacleProb =0.3):
obstacleGrid = np.random_sample(( rows, cols))

Error:

File "<string>", line 6
    START =  0
    ^
IndentationError: expected an indented block

Jan 30, 2022 in Python by anonymous

edited Mar 4, 2025 291 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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