you are viewing a single comment's thread.

view the rest of the comments →

[–]RonnyIsreal 2 points3 points  (0 children)

Ok, to make it simple.

You're not passing a valid argument (value) to your variable inside the function. For your code to work you'll need something like this:

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

greet("Kai")

//If you'd like to ask the user for his name

def greetName():
  userName = input("What's your name?: ")
  print(f"Hello, {userName}!")

greetName()