Upgrade to Pro — share decks privately, control downloads, hide ads and more …

フューチャー算数 ─ 計算ドリルを自動化するぜ! / Future Math - Automated Drills

フューチャー算数 ─ 計算ドリルを自動化するぜ! / Future Math - Automated Drills

8月20日(月)-24日(金)、慶應義塾大学湘南藤沢キャンパスにて開催したアカデミーキャンプ 2018夏「オッケーグーグル、宿題やっといて!」第2期の「フューチャー算数」にて使用したスライドに、当日の反応なども含めて加筆したものです。

Kenji Saito

August 21, 2018
Tweet

More Decks by Kenji Saito

Other Decks in Technology

Transcript

  1. 2018
    :
    ( )
    2018 – – 2018-08-21 – p.1/20

    View full-size slide

  2. ( )
    2018 – – 2018-08-21 – p.2/20

    View full-size slide


  3. (35 )
    ^^;
    2
    2018 – – 2018-08-21 – p.3/20

    View full-size slide

  4. iPad Photomath ( )
    Photomath
    Mathpix ( )
    Mathpix
    2018 – – 2018-08-21 – p.4/20

    View full-size slide

  5. 8
    8 Photomath

    1 4 (99 )
    100
    e ( )
    → 5 6 10 ( )
    2018 – – 2018-08-21 – p.5/20

    View full-size slide


  6. 2018 – – 2018-08-21 – p.6/20

    View full-size slide

  7. iPad
    IV
    OFF/ON ON
    2018 – – 2018-08-21 – p.7/20

    View full-size slide

  8. Pythonista
    Pythonista
    2018 – – 2018-08-21 – p.8/20

    View full-size slide

  9. >
    1 + 1 ( = )
    Enter
    × * ( : 3 * 4)
    ÷ / ( : 81 / 9)
    // ( : 81 // 9)
    ( )
    (2 + 3) * (4 - 2)
    2018 – – 2018-08-21 – p.9/20

    View full-size slide

  10. → . . .
    2018 – – 2018-08-21 – p.10/20

    View full-size slide

  11. ( 3)
    2
    OK
    1
    2018 – – 2018-08-21 – p.11/20

    View full-size slide

  12. . . .
    Python
    Python
    ( )
    2018 – – 2018-08-21 – p.12/20

    View full-size slide

  13. Pythonista
    SCRIPT LIBRARY iCloud “puzzle.py”
    ⊲ . . .
    Arguments ( ( )) 0∼5
    0, 1, 2, 3, 4, 5
    Run
    ×
    ( )
    ( iPad 8 ( 2 ) )
    2018 – – 2018-08-21 – p.13/20

    View full-size slide

  14. 2018 – – 2018-08-21 – p.14/20

    View full-size slide

  15. Pythonista . . .
    “drill.py”
    ( )
    ⊲ . . .
    1 (“drill1.html”) ( )
    1 1 (“drill2.html”)
    2018 – – 2018-08-21 – p.15/20

    View full-size slide

  16. HTML ( )
    Share. . .
    2018 – – 2018-08-21 – p.16/20

    View full-size slide

  17. “solve.py”
    ⊲ . . .
    drill1.html Run
    Console
    drill1-answer.html
    2018 – – 2018-08-21 – p.17/20

    View full-size slide

  18. solve.py ( )
    # HTML
    soup = BeautifulSoup(
    codecs.open(file_path, ’r’, ’utf-8’),
    features=’html.parser’
    )
    #
    lines = soup.get_text().split(’\n’)
    # 1
    for line in lines:
    #
    if len(line) > 0 and line[0:1].isdecimal():
    # ‘=’ ‘+’, ‘-’, ‘*’, ‘//’
    s = line[:-2] \
    .replace(SOP_ADD, ’+’).replace(SOP_SUB, ’-’) \
    .replace(SOP_MULT, ’*’).replace(SOP_DIV, ’//’)
    #
    answer = eval(s)
    print("{0} {1}".format(line, answer))
    2018 – – 2018-08-21 – p.18/20

    View full-size slide

  19. IFTTT
    this Google Assistant
    that iOS Reminders ( ) Reminder
    do_homework
    do_homework.py ( ⊲ ) ( )
    AirPrint PX-S05B
    2018 – – 2018-08-21 – p.19/20

    View full-size slide

  20. Python
    2018 – – 2018-08-21 – p.20/20

    View full-size slide