Question #270551

class Option:


def __init__(self):


self._firstnum = 0


Question:


1. what is the error in this code?


Expert's answer

When you run this code:

class Option:




  def __init__(self):
  
  
  
  
  self._firstnum = 0

The output will be:

IndentationError: expected an indented block


Correct solution will be:

class Option:




  def __init__(self):
  
  
  
  
    self._firstnum = 0
LATEST TUTORIALS
APPROVED BY CLIENTS