自动评分小编程任务 [英] automatically grading small programming assignments

查看:67
本文介绍了自动评分小编程任务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我有几个课程,我使用Python教授入门编程。什么

我希望学生能够通过很多非常小的课程,

来学习基本的编程结构。比如,在列表中返回最大值,

制作具有特定模式的列表,非常简单的字符串解析等等。不幸的是,

需要花费大量时间来评分这样的手工制作的东西,所以我想尽可能地自动化它。


我设想了许多可能的解决方案。在一个解决方案中,我提供了一个带有docstring的函数

模板,他们必须填写它以通过doctest。是否有一个好的(和安全的)在线方式吗?有学生邮政编码,

和doctest返回的东西。我很乐意让他们提交,直到他们得到它,记录

每次尝试。


或者有更好的方法来做这种事情教导其他人怎么用
Python来处理这个?

谢谢,

Brian Blais


- -

-----------------

bb **** @ bryant.edu
http: //web.bryant.edu/~bblais

Hello,

I have a couple of classes where I teach introductory programming using Python. What
I would love to have is for the students to go through a lot of very small programs,
to learn the basic programming structure. Things like, return the maximum in a list,
making lists with certain patterns, very simple string parsing, etc. Unfortunately,
it takes a lot of time to grade such things by hand, so I would like to automate it
as much as possible.

I envision a number of possible solutions. In one solution, I provide a function
template with a docstring, and they have to fill it in to past a doctest. Is there a
good (and safe) way to do that online? Something like having a student post code,
and the doctest returns. I''d love to allow them to submit until they get it, logging
each attempt.

Or perhaps there is a better way to do this sort of thing. How do others who teach
Python handle this?
thanks,
Brian Blais

--
-----------------

bb****@bryant.edu
http://web.bryant.edu/~bblais

推荐答案

Brian Blais写道:
Brian Blais wrote:

您好,


我有几个课程,我使用Python教授入门编程。什么

我希望学生能够通过很多非常小的课程,

来学习基本的编程结构。比如,在列表中返回最大值,

制作具有特定模式的列表,非常简单的字符串解析等等。不幸的是,

需要花费大量时间来评分这样的手工制作的东西,所以我想尽可能地自动化它。


我设想了许多可能的解决方案。在一个解决方案中,我提供了一个带有docstring的函数

模板,他们必须填写它以通过doctest。是否有一个好的(和安全的)在线方式吗?有学生邮政编码,

和doctest返回的东西。我很乐意让他们提交,直到他们得到它,每次尝试记录

Hello,

I have a couple of classes where I teach introductory programming using Python. What
I would love to have is for the students to go through a lot of very small programs,
to learn the basic programming structure. Things like, return the maximum in a list,
making lists with certain patterns, very simple string parsing, etc. Unfortunately,
it takes a lot of time to grade such things by hand, so I would like to automate it
as much as possible.

I envision a number of possible solutions. In one solution, I provide a function
template with a docstring, and they have to fill it in to past a doctest. Is there a
good (and safe) way to do that online? Something like having a student post code,
and the doctest returns. I''d love to allow them to submit until they get it, logging
each attempt.



在另一个问题上,编码风格,您可以在提交的代码上运行诸如

Pylint之类的东西,并根据

警告发出。

可能需要进行一些调整 - 我挑剔的经验

编译器是大多数但不是所有警告都表明存在问题。

On a different matter, coding style, you could run something such as
Pylint on submitted codes and penalize them based on the number of
warnings emitted.
Maybe some adjustments would be necessary -- my experience with picky
compilers is that most but not ALL warnings indicate problems.




Brian Blais写道:

Brian Blais wrote:

您好,


我有几个课程,我使用Python教授入门编程。什么

我希望学生能够通过很多非常小的课程,

来学习基本的编程结构。比如,在列表中返回最大值,

制作具有特定模式的列表,非常简单的字符串解析等等。不幸的是,

需要花费大量时间来评分这样的手工制作的东西,所以我想尽可能地自动化它。


我设想了许多可能的解决方案。在一个解决方案中,我提供了一个带有docstring的函数

模板,他们必须填写它以通过doctest。是否有一个好的(和安全的)在线方式吗?有学生邮政编码,

和doctest返回的东西。我很乐意让他们提交,直到他们得到它,记录

每次尝试。


或者有更好的方法来做这种事情教导其他人如何处理这个问题?
Hello,

I have a couple of classes where I teach introductory programming using Python. What
I would love to have is for the students to go through a lot of very small programs,
to learn the basic programming structure. Things like, return the maximum in a list,
making lists with certain patterns, very simple string parsing, etc. Unfortunately,
it takes a lot of time to grade such things by hand, so I would like to automate it
as much as possible.

I envision a number of possible solutions. In one solution, I provide a function
template with a docstring, and they have to fill it in to past a doctest. Is there a
good (and safe) way to do that online? Something like having a student post code,
and the doctest returns. I''d love to allow them to submit until they get it, logging
each attempt.

Or perhaps there is a better way to do this sort of thing. How do others who teach
Python handle this?



它可能会成为个人风格的不良替代品,

特别是如果他们刚开始编程的话。


- Paddy。

It might turn out to be a poor substitute for the personal touch,
especially If they are just starting to program.

- Paddy.


Brian Blais写道:
Brian Blais wrote:

我有几个课程,我使用

Python教授入门编程。我希望有的是让学生们通过一个非常小的程序来学习基本的编程结构。

比如,返回最大值一个列表,制作带有某些

模式的列表,非常简单的字符串解析等等。不幸的是,需要花费大量的时间来手动评分这些东西,所以我会喜欢自动化它

尽可能多。


我设想了许多可能的解决方案。在一个解决方案中,我提供了一个带文档字符串的

函数模板,他们必须将其填入过去

doctest。有一个好的(和安全的)在线方式吗?东西

喜欢有学生邮政编码,doctest返回。我很乐意

允许他们提交,直到他们得到它,记录每次尝试。
I have a couple of classes where I teach introductory programming using
Python. What I would love to have is for the students to go through a
lot of very small programs, to learn the basic programming structure.
Things like, return the maximum in a list, making lists with certain
patterns, very simple string parsing, etc. Unfortunately, it takes a
lot of time to grade such things by hand, so I would like to automate it
as much as possible.

I envision a number of possible solutions. In one solution, I provide a
function template with a docstring, and they have to fill it in to past
a doctest. Is there a good (and safe) way to do that online? Something
like having a student post code, and the doctest returns. I''d love to
allow them to submit until they get it, logging each attempt.



一些人正在玩一个安全的Python在线

翻译/互动提示一会儿:
http:// groups -beta.google.com/group/...46d738a8859c2f


我认为他们中的任何一个都不是你需要的可用性水平

虽然。

你能让学生为每个程序下载一个文件吗?你想让它们运行吗?我会运送类似::


import unittest


#============== ==========================

#这是你需要填写的功能

#========================================

def list_max(items):

''''''你的代码在这里'''''

#========== ========================

#此时不要修改代码

#==================================

class Test(unittest.TestCase) :

def test_range(个体经营):

self.failUnlessEqual(list_max(range(10)),10)

def test_first_elem(self) :

self.failUnlessEqual(list_max([1,0,0,0]),1)

...


如果__name__ ==''__ main__'':

unittest.main()


那么你的学生所要做的就是下载文件,填写在

中定义相应的函数,并运行相同的文件直到

the unitte st说一切顺利。我想这并没有解决你的记录每次尝试的问题。问题虽然...


STeVe

A few people were playing around with a secure Python online
interpreter/interactive prompt a while back:

http://groups-beta.google.com/group/...46d738a8859c2f

I don''t think any of them was quite at the usability level you''d need
though.
Can you just have the students download one file for each program you
want them to run? I''d ship something like::

import unittest

# ========================================
# This is the function you need to fill in
# ========================================
def list_max(items):
''''''Your code goes here''''''
# ==================================
# Don''t modify code below this point
# ==================================
class Test(unittest.TestCase):
def test_range(self):
self.failUnlessEqual(list_max(range(10)), 10)
def test_first_elem(self):
self.failUnlessEqual(list_max([1, 0, 0, 0]), 1)
...

if __name__ == ''__main__'':
unittest.main()

Then all your students would have to do is download the file, fill in
the definition of the appropriate function, and run the same file until
the unittest said that everything worked. I guess that doesn''t solve
your "logging each attempt" problem though...

STeVe


这篇关于自动评分小编程任务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆