The introduction of the blind method and the python practice system

Keywords: Python Lambda

Catalog

I. Introduction and advantages of blind fighting

Brief introduction: blind typing refers to the behavior that when typing without looking at the keyboard or looking at the manuscript, the line of sight does not need to go back and forth between the manuscript and the keyboard. Blind typing can increase the speed of input. Blind typing requires the typist to have a good positioning ability for the keyboard.

                           . ACM training also requires blind play.

Blind typing is a very necessary skill for both typists and programmers. Imagine that the same algorithm, except for ideas, was written in one or two minutes by others, and you spent seven or eight minutes looking at the keyboard. Isn't it a waste of time. Sometimes that's how the gap widens.


How to practice

1. Finger position

                                , two thumbs control the space bar, the other four fingers of the left hand are placed.

2. Finger Division

                            ? Three keys, why six fingers? Because the task of the two index fingers is A little heavy, the index fingers should control two rows of vertical keys, such as: the right index finger is U, J, M, Y, H, N six keys, the left index finger is R, F, V, T, G, B six keys. In this way, the division of ten fingers is completed. As long as you remember the position of each key and the key of each finger, you can practice blind typing.

3. Blind play skills

Now most people use the Pinyin input method of blind typing, but most people only use the index finger, although it can also be remembered for a long time, but it is not suitable for the correct blind typing method.
                   .

4. pictures



The pithy formula of alphabetic arrangement of keyboard

As we all know, computer keyboard letters are arranged in a disorderly order. It's obviously very difficult to memorize the order of 26 unordered letters. But does not remember the keyboard alphabet order, is bound to affect the study of typing and improve the speed of typing. (at the beginning, the keyboard designer was afraid of typing too fast, damaging the keyboard and deliberately disordering the order of letters.)

           the following pithy formula can quickly record the keyboard position:

Seven (q) bowls (w ǎ n) goose (E) meat (r ò u) soup (t ā ng), has (y ǐ) no (w ú) one (y ī) my (w ǒ) grandma (p ó).
Love (i) on the (sh) ng (d) U (f) soup (g). Go back to (hu í) home (ji ā) quickly (ku à i) le (l è).

Four: python typing practice system

from tkinter import *
import random
import string
from datetime import datetime

root = Tk()
root.title("Python Typing system")
Label(root, text='Typing:').grid(row=0)
Label(root, text='User response:').grid(row=1)
Label(root, text='Examination results:').grid(row=2)
v1 = StringVar()
v2 = StringVar()
v3 = StringVar()
v1.set("click'Start testing'Button to start question")
e1 = Entry(root, text=v1, state='disabled', width=40, font=('Song style', 14))
e2 = Entry(root, textvariable=v2, width=40, font=('Song style', 14))
e3 = Label(root, textvariable=v3, width=40, font=('Song style', 10), foreground='red')
e1.grid(row=0, column=1, padx=10, pady=20)
e2.grid(row=1, column=1, padx=10, pady=20)
e3.grid(row=2, column=1, padx=10, pady=20)
text = Text(root, width=80, height=7)
text.grid(row=4, column=0, columnspan=2, pady=5)


class TypingTest:
    def __init__(self):
        self.time_list = []
        self.letterNum = 20
        self.letterStr = ''.join(random.sample(string.printable.split(' ')[0], self.letterNum))
        self.examination_paper = ''

    def time_calc(self):
        self.time_list.append(datetime.now())
        yield

    def create_exam(self):
        text.delete(0.0, END)
        # e3.delete(0, END)
        v1.set(self.letterStr)
        self.time_calc().__next__()
        text.insert(END, "Start:%s \n" % str(self.time_list[-1]))
        user_only1.config(state='active')

    def score(self):
        wrong_index = []
        self.time_calc().__next__()
        text.insert(END, "End:%s\n" % str(self.time_list[-1]))
        use_time = (self.time_list[-1] - self.time_list[-2]).seconds
        self.examination_paper = v2.get()
        if len(self.examination_paper) > self.letterNum:
            v3.set("Wrong input data, more answers than questions")
        else:
            right_num = 0
            for z in range(len(self.examination_paper)):
                if self.examination_paper[z] == self.letterStr[z]:
                    right_num += 1
                else:
                    wrong_index.append(z)
            if right_num == self.letterNum:
                v3.set("Absolutely right,Accuracy rate%.2f%%When used:%s second" % ((right_num * 1.0) / self.letterNum * 100, use_time))
            else:
                v3.set("Accuracy rate%.2f%%When used:%s second" % ((right_num * 1.0) / self.letterNum * 100, use_time))
                text.insert(END, "Title:%s\n" % self.letterStr)
                tag_info = list(map(lambda x: '4.' + str(x + 3), wrong_index))
                text.insert(END, "Answer:%s\n" % self.examination_paper)
                for i in range(len(tag_info)):
                    text.tag_add("tag1", tag_info[i])
                    text.tag_config("tag1", background='red')
                    user_only1.config(state='disabled')


TypingTest = TypingTest()
Button(root, text="Start testing", width=10, command=TypingTest.create_exam).grid(row=3, column=0, sticky=W, padx=30, pady=5)
user_only1 = Button(root, text="Hand in hand", width=10, command=TypingTest.score, state='disable')
user_only1.grid(row=3, column=1, sticky=E, padx=30, pady=5)

mainloop()

The effect is as follows:

Posted by hyperyoga on Tue, 03 Dec 2019 15:48:23 -0800