Why doesn't this work? (Code coach: Land Ho!)
I don't want to write everything down, look for the puzzle to find the info for i in range(100): peeps = i + 1 if peeps % 20 == 0: boats = peeps/20 elif peeps % 20 < 5: boats = round((peeps/20) + 0.5) else: boats = round((peeps/20)) if boats == 1: print(10) else: print((boats - 1) * 20 + 10) 10 10 10 10 -10 -10 -10 -10 -10 -10 10 10 10 10 10 10 10 10 10 10 30 30 30 30 10 10 10 10 10 30 30 30 30 30 30 30 30 30 30 30.0 50 50 50 50 30 30 30 30 30 30 50 50 50 50 50 50 50 50 50 50.0 70 70 70 70 50 50 50 50 50 70 70 70 70 70 70 70 70 70 70 70.0 90 90 90 90 70 70 70 70 70 70 90 90 90 90 90 90 90 90 90 90.0 That's my code and the outputs. I'm pretty sure I know why some of them have .0 on the end, I fixed that but whatever their 3rd value they input is (which they don't show you) doesn't work with the fixed version. The reason for the .0 should be that I didn't bother to make my first if an integer