$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #34

What is printed?

name = "Sam"
print(f"Hi {name}, {2 + 2}")
  1. Hi Sam, 4
  2. Hi {name}, 4
  3. Hi Sam, {2+2}
  4. Hi Sam, 22
f-strings interpolate variables and evaluate expressions.
Play Problem Solving ▸