반응형
Debugging sayHello function
The starship Enterprise has run into some problem when creating a program to greet everyone as they come aboard. It is your job to fix the code and get the program working again!
Example output:
Hello, Mr. Spock
Solution:
class SayHello:
def __init__(self):
self.__hello = "Hello"
def say(self, name):
return f"{self.__hello}, {name}"
say_hello = SayHello().say
반응형
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
1113. Parse nice int from char problem (0) | 2022.11.13 |
---|---|
1112. Sum of Multiples (0) | 2022.11.13 |
1110. No oddities here (0) | 2022.11.10 |
1109. Sentence Smash (0) | 2022.11.09 |
1108. JavaScript Array Filter (0) | 2022.11.09 |