Code:
Simple code that outputs a personalized greeting:
1 2 3 |
name = "Shrikant" print("Hello, " + name + "!") |
This code uses the +
operator to concatenate the string "Hello, "
, the value of the variable name
, and the string "!"
to form the final greeting.
When run, this code will output:
1 |
Hello, Shrikant! |