Write a function called greet that says hello to whoever's name it's given. greet("Ada") should give back Hello, Ada!
New to coding? Replace pass (or the empty line between the { }) with:
return "Hello, " + name + "!"
In Java, C#, C++, JavaScript and TypeScript, put a ; at the end of that line.
Input: greet("Ada")
Output: "Hello, Ada!"
Input: greet("Neumont")
Output: "Hello, Neumont!"
Your solution is checked against 2 example tests and 2 hidden tests (edge cases and bigger inputs).
Languages you don't learn in class are worth more: C++ 1.25×, JavaScript, TypeScript, C, Rust and Go 1.5×. Your first solve in a language unlocks its "Learned" achievement: +25 for learning it.
Loading editor...
Run Code checks the example tests. Submit runs every test, including hidden ones.