Why doesn’t the following code work;?


Why doesn’t the following code work;?
def create_spreadsheet(title,row_count):
print(“Creating spreadsheet called " + title + " with” + str(row_count) + " rows."
create_spreadsheet(“Downloads”, 1000)

FAQ: Introduction to Functions - Keyword Arguments

Is it not being accepted in a lesson? Which lesson? Please post the URL of the exercise page.

The problem could be as simple as a missing space in the concatenation.


I am stuck at the first step of this lesson: https://www.codecademy.com/paths/computer-science/tracks/cspath-intro/modules/cspath-python-functions/lessons/intro-to-functions/exercises/keyword-arguments

the code so far: def create_spreadsheet(title)
print(“Creating spreadsheet called " + title)

def create_spreadsheet(title) returns a syntax error:invalid syntax. Is this a possible bug?


Do you have a colon (:slight_smile: at the end of the def line? It doesn’t show in your message text.


That was exactly the problem, forgot the colon, thank you very much!


Thanks for the help, Roy. It worked when I went back into it.


im having trouble wit the next part of the code its saying to call create_spreadsheet with a title of Downloads but when i do that i get the did you call create_spreadsheet() with Downloads as an argument msg

def create_spreadsheet(title):
print("creating a spreadsheet called "+title)


can someone help me understand what i am doing wrong please thank you