Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Let’s add a docstring to the greeting method. How about, “Outputs a message with the name of the person”.

 #Let’s add a docstring to the greeting method. How about, “Outputs a message with the name of the person”
  class Person:
  def __init__(self, name):
    self.name = name
  def greeting(self):
    ___
    print("Hello! My name is {name}.".format(name=self.name)) 

help(___)
  
 
PREVIOUS NEXT
Tagged: #add #docstring #greeting #How #message
ADD COMMENT
Topic
Name
5+5 =