Week 2: Parentheses and calls

C code typing course. 12 wpm, 90% accuracy.

Parentheses do two jobs in C. They call a function, and they wrap the values you pass to it. Every opening parenthesis needs a closing one, and if one is missing the compiler reports an error. This week you learn to type ( and ) with the correct fingers on the US English layout, and you use them in a simple function call.

What you will learn

This week you learn two new symbols. On the US English layout:

  • (: the 9 key with Shift. Press Shift with the opposite pinky, and press 9 with your right ring finger.
  • ): the 0 key with Shift. Press Shift with the opposite pinky, and press 0 with your right pinky.

A small example is getchar(). Even with nothing between the parentheses, the call is complete, and the program reads one character from its input. The empty pair shows what the parentheses do: they mark a call.

Technique tips

  • Plan the pair. As soon as you type (, think of the ) that will follow it. Then fill in the middle, so the closing symbol never gets forgotten.
  • Think of Shift and the symbol key as two separate moves. Get your opposite pinky ready for Shift, then move to the symbol key. A clear order helps you hit the right symbol every time.
  • Reach with your finger, not your arm. After you press a key, bring the finger back to the home row.
  • Look at the screen. Check that the parenthesis landed where you expected by reading the line, not by looking at your hands.

Lessons

  1. Lesson 1, learn (10 to 15 minutes): Watch the ( and ) keys on the keyboard demo. Notice which hand presses Shift, then type each symbol five times.
  2. Lesson 2, practice (10 to 15 minutes): Type short calls such as getchar(). In every line, check that the number of opening and closing parentheses is equal.
  3. Lesson 3, review (10 to 15 minutes): Take the two-minute test and type lines with parentheses. Save your result and look closely at your accuracy.

This week’s goal

This week’s target is 12 WPM and 90% accuracy. Finishing the week’s lessons earns you 1 star. Reach 90% accuracy for 2 stars, and also reach 12 WPM for 3 stars. Focus on accuracy first. Speed grows on top of accurate typing.

Symbols this week

The colored keys are the ones you learn this week. The color shows which finger presses the key.

` ~ 1 ! 2 @ 3 # 4 $ 5 % 6 ^ 7 & 8 * 9 ( 0 ) - _ = + Backspace Tab Q W E R T Y U I O P [ { ] } \ | Caps A S D F G H J K L ; : ' " Enter Shift Z X C V B N M , < . > / ? Shift Ctrl Win Alt Alt Gr Win Menu Ctrl

This week’s lessons

Do the lessons in order. Each one ends with a test, and your best result is saved.

  1. Lesson 1: Learn

    New symbols: ( )

    12 minutes

    Start
  2. Lesson 2: Practice

    Practice

    12 minutes

    Start
  3. Lesson 3: Review and test

    Review and test

    12 minutes

    Start

All weeks