Week 3: Quotes and strings

Python code typing course. 13 wpm, 90% accuracy.

In Python, text is written inside quotation marks and called a string. A string can start and end with double quotes or with single quotes, but the closing mark must match the opening one. This week you practice both marks. A string that is never closed causes an error on that line, so accuracy is the main goal.

What you will learn

This week you learn two symbols. The double quote " is pressed by holding Shift with the opposite pinky and pressing the apostrophe key with the right pinky. The single quote ' is pressed with the apostrophe key alone, also with the right pinky.

Here are two short lines that use both marks:

print("hello")
print('python')

Notice that each string starts and ends with the same mark. Type the opening quote, then the text, then the closing quote, before you move on to the next line.

Technique tips

  • Check the closing mark right after you open a string. Keep your eyes on the end of the text.
  • For a double quote, press Shift with the opposite pinky first, then the apostrophe key. Release both once the mark appears.
  • The single quote needs no Shift. Press it lightly with the right pinky. Pressing harder does not make it faster.
  • Read the whole string as one unit before you type it, such as "hello" inside print().
  • If a string needs double quotes inside it, wrap the whole string in single quotes, like 'He said "hi"'.

Lessons

  1. Lesson 1 (10 to 15 minutes): Learn. Watch the keyboard demo for both quote marks. Type print("hello") slowly.
  2. Lesson 2 (10 to 15 minutes): Practice. Repeat lines such as print('python') and print("hello"). Check that each string opens and closes with the same mark.
  3. Lesson 3 (10 to 15 minutes): Review. Take the 2-minute test built from this week’s quote drills. Note any missed closing marks and repeat those lines next time.

This week’s goal

The goal is 13 wpm with 90% accuracy. The first star comes when you finish the lessons. The second star comes at 90% accuracy, and the third when you also reach 13 wpm. With quotes, a missed closing mark causes an error, so get the marks right before you chase 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