Your First Program

Easy10–15 pts depending on language · +25 for learning a language that's new to you

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.

Examples

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).

Solved by 6 members

  1. 1RainePython 3 · Oct 12
  2. 2Alex T.Rust · Oct 13
  3. 3brett B.C++ · Oct 14
  4. 4Isaac M.Rust · Oct 14
  5. 5CasonRust · Oct 20
Full leaderboard →

Your Solution

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...

IntelliSense: connecting…

Run Code checks the example tests. Submit runs every test, including hidden ones.