Friendly Name

A user may type their name in any style: lowercase, uppercase, or mixed case. Write a function greet that takes name and returns a greeting in the format hello Name!. The first letter of the name should be uppercase, and the rest should be lowercase.

Примеры

Ввод
"riley"
Вывод
"hello Riley!"
Ввод
"JACK"
Вывод
"hello Jack!"
Ввод
"jAnE"
Вывод
"hello Jane!"

Нужно реализовать

def greet(name: str) -> str:

Теги

strings
PostgreSQLv16

Tutaj pojawi się wynik wykonania kodu

Visible tests
1
Input
"riley"
Expected"hello Riley!"
2
Input
"JACK"
Expected"hello Jack!"
3
Input
"jAnE"
Expected"hello Jane!"
4
Input
"bob"
Expected"hello Bob!"
5
Input
"a"
Expected"hello A!"
6
Input
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Expected"hello Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!"
Focus radio
Paused · SomaFM · Fluid