← Back to challenges

The Fifth Argument

PythonHardlanguage_fundamentalsconditions

Instructions

Create a function (named fifth) that takes some arguments and returns the type of the fifth argument. In case the arguments were less than 5, return "Not enough arguments".

Examples

fifth(1, 2, 3, 4, 5) ➞ int

fifth("a", 2, 3, [1, 2, 3], "five") ➞ str

fifth() ➞ "Not enough arguments"

Notes

  • Don't get confused between zero-indexing and one-indexing.
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Stupid Addition