Skip to content
free
K
1
2
practice
Home
Math
English
Science
Social Studies
Contact
Language
English
Español
Sign In
/
High School Electives
/
Computer Science
/
Comments and Readability
Grade Level
Computer Science
HSCS.108 Comments and Readability
0%
Skill Level
🔴 Hard
00:00
Progress to Next Level
25% to Medium
Easy
Medium
Hard
Mastery
100%
Before code: for row in rows: if row["status"] == "new": process(row) processed = processed + 1 Which revision improves readability while preserving the loop behavior?
A
Move processed = processed + 1 before process(row) because counting first is easier to read.
B
Rename row to r and processed to p, then add comments after each line.
C
Rename processed to new_rows_processed and optionally extract is_new_row(row) while keeping process(row) before the count update.
D
Change row['status'] == 'new' to row['status'] != 'old' so the name is broader.
Submit Answer