Week 2: Parentheses and calls

Small Basic code typing course. 12 wpm, 90% accuracy.

To call a function, you write its name first, then open a parenthesis and put the values inside. In Small Basic, lines such as Math.SquareRoot(16) all follow this pattern. This week you learn to type the ( and ) symbols on the right keys and in the right order. A parenthesis that is never closed breaks the program, so think of every opening bracket together with its partner.

What you will learn

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

  • (: 9 key + Shift, opposite pinky. Right ring finger.
  • ): 0 key + Shift, opposite pinky. Right pinky.

Example:

TextWindow.WriteLine(2 + 3)
Math.SquareRoot(16)

The first line writes the result of 2 + 3 to the screen. The second line calculates the square root of 16. Both lines open and close a parenthesis.

Technique tips

  • After you open a parenthesis, fill in its contents and leave the closing one for last. Typing () first and then moving inside helps you remember the closing symbol.
  • Press Shift with the opposite pinky. Do not move your whole hand to reach it.
  • Your right ring finger handles the 9 key and your right pinky handles the 0 key. Reach out and return quickly.
  • Quotation marks come in week 3. For now, put only numbers and simple values inside your parentheses.
  • Enter fills in the indentation of the next line for you. You do not need to type the spaces again, just type the code.

Lessons

  1. Lesson 1, 10 to 15 minutes: Learn the ( and ) symbols. Watch the keyboard demo and type each symbol five times.
  2. Lesson 2, 10 to 15 minutes: Write function calls. Open the parenthesis, fill in the value, then close it.
  3. Lesson 3, 10 to 15 minutes: Review what you practiced, then take the 2-minute test.

This week’s goal

The targets are 12 wpm and 90% accuracy. Finishing the lessons earns one star. Reaching 90% accuracy earns the second star. The third star also needs 12 wpm. Reducing parenthesis mistakes comes before speed.

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