← Back to Variables
Question 238
Greeting with a String
Greeting with a String
String variables hold text. Declare a string variable named name and assign it the value "Maya". Then use string interpolation to print the greeting: Hello, Maya! Interpolation lets you drop a variable directly inside text by putting a $ before the opening quote and wrapping the variable in curly braces.
Expected Output:
Hello, Maya!= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Variables
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.