Master Python

Name badge

Name badge

A conference prints a badge for everyone who arrives. The badge software hands your function a name and expects one line of greeting back, in exactly the same shape every time.

Write greeting, which takes a piece of text called name and returns the word Hello, a comma, a space, the name, and a full stop.

Worked example

Input:  name = "Ada"
Output: "Hello, Ada."

Input:  name = "Grace Hopper"
Output: "Hello, Grace Hopper."

Constraints

  • name is between 0 and 40 characters long.
  • Use the name exactly as it arrives. Do not change the capitalisation and do not trim anything off the ends.
  • If the name is empty, return "Hello, ." anyway. The shape of the badge does not change.
Code

Run your code to see how it does on the examples. Submit also runs the hidden cases.