Statistics on Signals and Systems CDIE job submissions in 2023

Achievement Statistics

Introduction: This article records the process of using Python to process the statistical process of homework submissions in online schools. Finally, paste the statistical results in the corresponding column of the final test score. This process provides data support for the final grade submission.

关键词: grades , statistics

作业提交
目 录
Contents
前言
作业处理
作业下载
作业统计
处理结果
总 结

 

01 Homework Submission


I. Introduction

  In 2023, the weekly homework submitted by the students of Signal and System CDIE in the online school will be counted through Python programming.

2. Job processing

1. Homework download

  Download assignments submitted by each student in batches from the online school. Together with the make-up, there are a total of 15 homework compressed files.

▲ Figure 1.2.1 Job files downloaded from the network

▲ 图1.2.1 网络下载得到的作业文件

  Use bandzip to unzip these files individually into the HWWORK subdirectory.

▲ Figure 1.2.2 Document directory after decompression

▲ 图1.2.2 解压缩后的文档目录

2. Job statistics

  The results processing procedure is as follows:

from headm import *

hwdir = r'D:\Temp\HWWORK'

dirdim = os.listdir(hwdir)

idid = 4

idstr = tspgetdopstring(idid).split('\r\n')

iddim = [s for s in idstr if len(s) > 2]

hwdim = [0] * len(iddim)

for d in dirdim:
    dirstr = os.path.join(hwdir, d)
    hwfile = os.listdir(dirstr)

    for f in hwfile:
        ff =  f.split('_')[0]

        idindex = iddim.index(ff)
        hwdim[idindex] = hwdim[idindex]+1

for i in range(len(iddim)):
    printff(iddim[i], hwdim[i])

clipboard.copy('\r\n'.join([str(i) for i in hwdim]))

  Use CTRL+V in EXCEL to paste the grades into the corresponding grade column.

3. Processing results

▲ Figure 1.2.3 The result after processing

▲ 图1.2.3 处理后的结果

 

Summary  ※


  This article records the process of using Python to process the statistics of homework submissions in online schools. Finally, paste the statistical results in the corresponding column of the final test score. This process provides data support for the final grade submission.


● Links to related diagrams:

Guess you like

Origin blog.csdn.net/zhuoqingjoking97298/article/details/131251559