Previous

Variables and Types

2 / 6
Next

Sometimes, programs require user input.

print("What is your name?")
first_name = input()
# Greet the person
print("Hello, "+first_name)

In the second line, the programs stops to ask the user for input. The user input is then stored in the variable first_name. The program then outputs a greeting by concatenating the text "Hello, " to the name. This is done with the + operator.

Send

Taking input

Hint
Beginner

Write a program that inputs a first name and then inputs a last name. Then greet the person with a warm hello.

For example, if the first input is Zara and the second input is Whitmore, then the output is Hello, Zara Whitmore.

Help
Solve
Reset
Run
Submit
 

Test results

Test result #
Expected output
Your output

Your email has been verified!