

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: Number Sum
incomplete
2: Find Min
incomplete
3: Remove Non-Integers
incomplete
4: Factorial
incomplete
5: Area Sum
incomplete
6: List Division
incomplete
7: Join Strings
incomplete
8: Unit Tests
incomplete
9: Fix a Failing Test
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
In this problem you'll need a way to represent the largest possible number: infinity. In Python, you can use this constant to represent positive infinity:
my_infinity: float = float("inf")
Write a function called find_min() that finds the smallest number in a list. If the list is empty, return float("inf"). For example:
find_min([1, 3, -1, 2]) -> -1find_min([18, 3, 7, 2]) -> 2Do not use the built-in min() function.