Free practice lab
Code Review
Read AI-written code line by line, flag each line that contains a defect and say what kind it is. Free — no account needed.
Free practice lab
Read AI-written code line by line, flag each line that contains a defect and say what kind it is. Free — no account needed.
Cookies on this site
We use essential cookies to run the questionnaire, practice labs and sign-in. With your permission we'd also like to use analytics to understand which pages help people, and advertising cookies to measure our Google Ads. Rejecting never limits any feature. Cookie policy
An eight-line function with two defects. Find both without flagging the lines that are fine.
Write average_rating(ratings) that returns the mean of a list of 1–5 star ratings, rounded to one decimal place. Return 0.0 when there are no ratings yet.
ratings is always a list of integers; it may be empty.