$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #34
What is printed?
name = "Sam" print(f"Hi {name}, {2 + 2}")
Hi Sam, 4
Hi {name}, 4
Hi Sam, {2+2}
Hi Sam, 22
f-strings interpolate variables and evaluate expressions.
Play Problem Solving ▸
◂ #33
all Problem Solving — predict the output questions
#35 ▸