...

/

Exercise 1: Greet a Person

Exercise 1: Greet a Person

Create a method that takes a name as an input and appends and prepends text with the name to greet the person.

We'll cover the following...

Problem statement

Write a greet method that takes a name, prepends "Hello ", appends an exclamation mark, "!", and then prints the resultant string.

Example

greet("Ada")

This prints:

Hello Ada!

Try it yourself

Press + to interact
# Start your code here
Loginto save progress

Quiz on Methods

Exercise 2: Greet Randomly

Loginto save progress