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

Brian Wilkes
Brian Wilkes
4,731 Points

Don't know what this is asking for!

i dont know what challenge is...

1 Answer

You are asked to create a python function. Here is an example:

def my_function():
  print("Hello from a function")

The name of the function is create_challenge and it has arguments name, language, and steps with steps optional with a default value of 1. Here is a function two parameters including one with a default:

def my_function(param1, country = "Norway"):
  print("I am from " + country)

The third requirement is within the function create a Challenge from the arguments. Similar code was shown in the previous video with:


Give it a try and post your code if you get stuck.