Boss or Guest
Apps often need to show different messages to the owner and to a regular user. Write a function greet that takes the logged-in user’s name name and the owner’s name owner. If the names match, return Hello boss; otherwise, return Hello guest.
Примеры
Ввод
"Daniel", "Daniel"Вывод
"Hello boss"Ввод
"Greg", "Daniel"Вывод
"Hello guest"Ввод
"a", "a"Вывод
"Hello boss"Нужно реализовать
def greet(name: str, owner: str) -> str:
Теги
strings
Accedi per vedere la cronologia degli invii
AccediAccedi per usare l'AI Mentor
AccediVisible tests
1
Input
"Daniel", "Daniel"Expected
"Hello boss"2
Input
"Greg", "Daniel"Expected
"Hello guest"3
Input
"a", "a"Expected
"Hello boss"4
Input
"x", "y"Expected
"Hello guest"5
Input
"Boss", "boss"Expected
"Hello guest"6
Input
"Hello, World!", "ab"Expected
"Hello guest"Focus radio
Paused · SomaFM · Fluid