Level 387 of 415
C: A loop in C
Indentation is part of the exercise. Press Enter at the end of each line and use spaces, never Tab.
- Target
- 26 WPM
- Accuracy
- 94.2%
- XP
- 95
int total = 0;↵
for (int i = 1; i <= n; i++) {↵
total += i;↵
}↵
return total;↵
}
Click here or press Tab to start typing
Notes on this level
Which finger types each key
A browser can only report which character was typed, never which finger pressed it. That is why this lesson blocks on the wrong key rather than claiming to detect the wrong finger — the finger is something you have to build the habit for, and the table below is the habit to build.
- (
- Right ring finger, number row — reaching up from L, with Shift held by the opposite hand's little finger.
- )
- Right pinky finger, number row — reaching up from ;, with Shift held by the opposite hand's little finger.
- {
- Right pinky finger, top row — reaching up from ;, with Shift held by the opposite hand's little finger.
- }
- Right pinky finger, top row — reaching up from ;, with Shift held by the opposite hand's little finger.
- ;
- Right pinky finger, home row — where the right pinky finger already rests.
- <
- Right middle finger, bottom row — reaching down from K, with Shift held by the opposite hand's little finger.
- +
- Right pinky finger, number row — reaching up from ;, with Shift held by the opposite hand's little finger.
- =
- Right pinky finger, number row — reaching up from ;.
What these symbols are for
Punctuation and symbols are where most typists slow down, because they combine the weakest fingers with the Shift key and appear too rarely for the habit to form by accident.
- (
- opens a bracketed aside, and opens an argument list in code.
- )
- closes a bracketed aside or an argument list.
- {
- opens a block of code or an object.
- }
- closes a block of code or an object.
- ;
- separates clauses, and ends a statement in many programming languages.
- <
- means “less than”, and opens an HTML tag.
- +
- adds, and joins pieces of text together in most programming languages.
- =
- assigns or asserts equality.
Where the mistakes come from
Errors are rarely random. A wrong key is usually the right finger travelling the wrong distance in its own column, which is why the fix is control rather than slowing down everywhere.
- (
- Most often mistyped as o, l, . — the other keys the right ring finger is responsible for.
- )
- Most often mistyped as -, =, p, [, ], \, ;, ', / — the other keys the right pinky finger is responsible for.
- {
- Most often mistyped as 0, -, =, p, ], \, ;, ', / — the other keys the right pinky finger is responsible for.
- }
- Most often mistyped as 0, -, =, p, [, \, ;, ', / — the other keys the right pinky finger is responsible for.
- ;
- Most often mistyped as 0, -, =, p, [, ], \, ', / — the other keys the right pinky finger is responsible for.
- <
- Most often mistyped as 8, i, k — the other keys the right middle finger is responsible for.
- +
- Most often mistyped as 0, -, p, [, ], \, ;, ', / — the other keys the right pinky finger is responsible for.
- =
- Most often mistyped as 0, -, p, [, ], \, ;, ', / — the other keys the right pinky finger is responsible for.
Stuck on this level?
Most difficulty at this stage is technique rather than effort. These explain the technique.
- Keyboard finger placement chartWhich finger types which key, and why the home row matters.
- How to learn touch typingWhat actually works, what to ignore, and how long it takes.
- Free typing speed testMeasure WPM, accuracy and consistency in 15 seconds to 5 minutes.
- Typing gamesFour games that drill speed, accuracy and weak fingers.