Answer to Question #270551 in Python for Matteo Villamor

Question #270551

class Option:


def __init__(self):


self._firstnum = 0


Question:


1. what is the error in this code?


1
Expert's answer
2021-11-24T00:43:46-0500

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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS