+ 2

Regarding Class

Please help me with the following code. 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()

13th Nov 2020, 7:42 PM
Shailendra Singh
Shailendra Singh - avatar
2 odpowiedzi
+ 9
class Student: def __init__(self, name): self.name = name def sayHi(self): print("Hi from " + self.name) s1 = Student("Amy") s1.sayHi()
13th Nov 2020, 7:58 PM
JaScript
JaScript - avatar
0
class student: def__init__(self,name): self.name=name def say Hi(self): print ("Hi from" + self.name) s1 = student("Amy") s1 = sayHi()
21st Feb 2022, 10:44 AM
Noah Patton
Noah Patton - avatar