This is courtesy of @chrisleechss. Both columns of the table below are supposed to calculate the square root of the number that students input in the first column…
Why does the script in the middle column produce nonsense for x>10? Is this a bug?
P.s. In fact, the script in the middle column only works with integers from 0 to 9. Nothing else gives a correct answer.
Note, in the original code, the error occurs when you increase to two digits, so you also have errors inputting decimal values. It’s essentially evaluating \sqrt{first digit}*remaining digits.