question 52 Strings & Text · easy
The welcome badge isn't cleaned
The sign-in screen should greet a customer with their name tidied: no spaces at the ends, and each word starting with a capital. The program below calls the right methods, but the greeting still shows the name exactly as it was typed. Find out why and fix it.
Input
name, a customer's name as typedPrints
Welcome, then the name stripped and in title case, then !Examples
" isaac SATO " → Welcome, Isaac Sato!; "aisha silva" → Welcome, Aisha Silva!; "NORA" → Welcome, Nora!Expected output1 line
- 1Welcome, Isaac Sato!