The function hello has a default value of "stupid" for the parameter x, which means that if no value is provided for x when the function is called, it will use "stupid" as the value for x. However, the way you have your code set up, the input for the name is being taken in the main function, not in the hello function. So, even if the user doesn't enter anything for their name, the input function will return an empty string, which is being passed as the argument for x when hello is called.
def main():
name = input("What is your name? ")
if not name:
name = "stupid"
hello(name)
def hello(x):
print("Greetings,", x)
main()
This way, if the user enters an empty string, the main function will pass "stupid" as the argument for hello, resulting in "Greetings, stupid" being printed. If the user enters a name, that name will be passed as the argument and "Greetings, [name]" will be printed.