Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Using Databases in Python Gettin' CRUD-y With It CRUD: Create Function

Jerry Kong
Jerry Kong
5,672 Points

What are 'steps arguments' in Python?

"Create a function named create_challenge() that takes name, language, and steps arguments. Steps should be optional, so give it a default value of 1. "

I'm stuck on this challenge.

2 Answers

Hi Jerry Kong,

could you please show us the code you have been writing so far and state where you are stuck exactly? That would allow us to help you much better :-)

Jerry Kong
Jerry Kong
5,672 Points

Hi Mario, thanks for your reply.

Apparently, the challenge after has the solution there. :) From there, I figured out what I did wrong. Here is my code:

from models import Challenge

def create_challenge(name,language,steps_arguments=1):

Challenge.create(name=name, language=language, steps_arguments=steps_arguments )


I confused "steps"(correct Key value) with "steps_arguments". Really silly mistake. :)

Great that you figured it out yourself mate. Kee up the good work!