A parameterised function

A parameterised function


Write a function anotherMasterpieceBy which inputs a parameter name and returns "Another masterpiece by name ".

Then write a main program that calls anotherMasterpieceBy with a name of your choice.

I do not understand what I am doing wrong. underneath is my code. can anyone help?

def anotherMasterpieceBy(name):
    name = input("Enter your name: ")
    anotherMasterpieceBy = ("Another masterpiece by ")
    return anotherMasterpieceBy(name)
if __name__ == "__main__":
    b = anotherMasterpieceBy()
    print (b)


It’s asking you to write a function that takes a parameter, and returns the string "Another masterpiece by " + whatever_name_is

Then another function called main that tales no parameters calls that function with whatever name.

I think from the description that this should be 4 lines of code, you’ve added some extra stuff there that doesn’t quite make sense