+ 3
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()
7 ответов
+ 3
Thankssss
+ 2
class Student:
def __init__(self, name):
self.name=name
def sayHi(self):
print("Hi from "+self.name)
s1=Student("Amy")
s1.sayHi()
+ 1
sayHi(___) ???
+ 1
self
0
This is not python!
It seems python but it's not
There is no indentation and there are even things on the same line that should be on different ones!
0
no problem, you can mark the comment as answered...
0
def and name