0
Fill in the blanks to create a class with a method sayHi().
class Student_ def __init__(self, name): self.name = name ___ sayHi(___): print("Hi from "+___.name) s1 = Student("Amy") s1.sayHi()
30 Answers
+ 3
Answer = #
class Student_ #:
__ __init__(self, name): # def
self.name = name
def sayHi(____): #self
print("Hi from "+____.name) #self
s1 = Student("Amy")
s1.sayHi()
Give me a Like Please
+ 3
Fill in the blanks to make sayHi() a class method.
class Person:
def __init__(self, name):
self.name = name
@classmethod
def
sayHi(cls):
print("Hi")
+ 2
class Person:
def __init__(self, name):
self.name = name
@classmethod
def
sayHi(cls):
print("Hi")
+ 2
Fill in the blanks to create a class with a method sayHi().
class Student:
def __init__(self, name):
self.name = name
def sayHi(self):
print("Hi from "+self.name)
s1 = Student("Amy")
s1.sayHi()
+ 2
class Student:
def __init__(self, name):
self.name = name
def sayHi(self):
print("Hi from "+self.name)
+ 1
Fill in the blanks to define a function named hello:
def hello():
print("Hi!")
0
i need help
0
wag wan pifting
0
0
1: @classmethod
2: def
0
Fill in the blanks to define a function named hello:
_ hello()_
print("Hi!")
0
Fill in the blanks to define a function named hello:
_ hello():
print("Hi!")
What is the blank before the hello
0
1. def
2. :
0
class Person:
def __init__(self, name):
self.name = name
@classmethod
def sayHi(cls):
print("Hi")
0
class Student:
def __init__(self, name):
self.name = name
def sayHi(self):
print("Hi from "+self.name)
s1 = Student("Amy")
s1.sayHi()
0
def :
- 1
class Person:
def __init__(self, name):
self.name = name
@classmethod
def
sayHi(cls):
print("Hi")
- 1
bruh
- 1
sup
- 1
Fill in the blanks to define a function
named hello:
__ hello()__
print ("Hi!")