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()

1st Jan 2018, 1:36 PM
L A Anto Gracious
L A Anto Gracious - avatar
30 Answers
+ 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")
21st Jan 2021, 5:15 PM
Syed Fahad Ahmed
Syed Fahad Ahmed - avatar
+ 2
class Person: def __init__(self, name): self.name = name @classmethod def sayHi(cls): print("Hi")
22nd Jul 2019, 3:45 AM
ThuanNC
+ 2
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
25th Jun 2020, 3:10 PM
Neshta Hagopian
Neshta Hagopian - avatar
+ 2
class Student: def __init__(self, name): self.name = name def sayHi(self): print("Hi from "+self.name)
24th Aug 2021, 9:42 AM
Bogdan-Mihai BontoČ™
Bogdan-Mihai BontoČ™ - avatar
+ 1
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()
21st Jan 2021, 2:30 PM
Syed Fahad Ahmed
Syed Fahad Ahmed - avatar
+ 1
Fill in the blanks to define a function named hello: def hello(): print("Hi!")
20th Jun 2021, 5:05 PM
Nadim MILOUD
0
i need help
12th Mar 2019, 2:55 PM
Monica Cain
Monica Cain - avatar
0
wag wan pifting
16th Dec 2019, 1:42 PM
SomeBoyLovesTheSesh
SomeBoyLovesTheSesh - avatar
0
31st Jan 2021, 2:23 AM
Pothi Mani
Pothi Mani - avatar
0
1: @classmethod 2: def
10th May 2021, 10:15 AM
Carlota PĂ©rez Alvarado
Carlota PĂ©rez Alvarado - avatar
0
Fill in the blanks to define a function named hello: _ hello()_ print("Hi!")
15th Jun 2021, 9:03 PM
Rebecca Gunset
0
Fill in the blanks to define a function named hello: _ hello(): print("Hi!") What is the blank before the hello
15th Jun 2021, 9:05 PM
Rebecca Gunset
0
1. def 2. :
27th Aug 2021, 2:40 PM
PRINCE KUMAR
PRINCE KUMAR - avatar
0
class Person: def __init__(self, name): self.name = name @classmethod def sayHi(cls): print("Hi")
13th Sep 2021, 4:06 PM
guenaizi abdelkader
guenaizi abdelkader - avatar
0
class Student: def __init__(self, name): self.name = name def sayHi(self): print("Hi from "+self.name) s1 = Student("Amy") s1.sayHi()
22nd Sep 2022, 5:01 PM
ABDUL WAHAB
0
def :
2nd May 2023, 4:35 PM
Dharmendra Kumar
Dharmendra Kumar - avatar
- 1
class Person: def __init__(self, name): self.name = name @classmethod def sayHi(cls): print("Hi")
2nd Nov 2019, 3:05 PM
ibrahim
- 1
bruh
18th Dec 2019, 10:35 AM
Jack Bradshaw
Jack Bradshaw - avatar
- 1
sup
8th Jan 2020, 3:11 PM
isaac
- 1
Fill in the blanks to define a function named hello: __ hello()__ print ("Hi!")
21st May 2021, 9:28 PM
Gfsd Fg
Gfsd Fg - avatar