⚠ simulated AI-generated code
This code is framed as if an AI coding assistant wrote it, and has a realistic issue AI assistants actually produce — sometimes a real bug, sometimes code that runs fine but is more complicated or less idiomatic than it needs to be. It is not from a real model call. Read it like you'd review any AI suggestion — don't assume it's correct, or well-written, just because it looks polished.
An AI assistant wrote find_largest(nums) to return the biggest number in a list, using its own comparison loop instead of anything built in. It reads carefully, and it works on the case the assistant probably tried.
fix this code so it matches
find_largest([3, 7, 2]) is 7. find_largest([4]) is 4. find_largest([-5, -1, -9]) is -1.