Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
In Python:
A list uses square brackets
[1, 2, 3]
When you use parentheses, that's a tuple
(1, 2, 3)
You can read more here
You don't need the parentheses around petals in the return line.
That code isn't ok, the error message is explicit about what's wrong there, this is the original code:
where
nb_petals
is a number, I don't know why you use()
in tears there, if you want to declare a list, use[]
If you want to use
%
both operands must be numbers. I can only guess that petals is a list there (given the error message).Isn't petals a list there? You can't use modulo operator between a list and an int. You also missed a
)
there.