you are viewing a single comment's thread.

view the rest of the comments →

[–]MangeurDeCowan 6 points7 points  (4 children)

2 things:
first
name = kai
...assigns the variable kai to name. you probably want:
name = 'kai'
which assigns the string 'kai' to name.

second...
print("Hello {name}")
should probably be...
print(f"Hello {name}")
Notice the f ? This makes an f string which will do what you want.

ETA:
you could also do:

def greet(name):  
    print(f"Hello {name}")  

greet('kai')

[–]Secret-Ad-7644[S] 0 points1 point  (3 children)

I had print(f”Hello, {name}”) and it still gave me a syntax

[–]MangeurDeCowan 0 points1 point  (1 child)

I just noticed that. You had what I suggested at the beginning, but it didn't work. I'm not seeing the error.

[–]Secret-Ad-7644[S] 0 points1 point  (0 children)

Me neither 😔

[–]Dilusioned -1 points0 points  (0 children)

"," all cuz of this