Scratch3.0 和 OJ(在线代码提交系统)


#1

OJ平台,只要是刷过算法的朋友们都应该很不陌生,比如大名鼎鼎的leetcode

最近我和我的搭档一直在跟scratch3.0玩耍,然后产生了一个酸爽的想法,能不能在scratch里面做算法题目呢?

传统的少儿编程里面教算法的时候,一直都是用案例作为主导,用动画的方式呈现出来。而我们的构想就是,scratch就是一个单纯的代码编辑器&&黑盒子,同时某种方式把数据传给scratch,然后scratch里面做数据的处理,然后再通过某种方式把数据传给后端,进行对于结果的对与错的判断。

当然一下前提条件是必须要满足的:

  • 题目逻辑不难
  • 对于算法运算时间的不能有严格的要求(毕竟scratch运算性能肯定跟C语言比不上,Scratch3.0用的是React框架)
  • 主要为了让孩子体验真正的解决问题的过程

如果有空的话,我会好好的研究研究这个项目,感兴趣的或者想参与开发工作的欢迎跟我联系。


#2

hah,这个或许要把算法抽象出来处理一下,重新用积木实现,不过我还没有怎么见过这方面的参考,或许先释放一点例子。


#3

Snap! 在这块做了大量探索,Snap! 是Scratch 和Scheme结合,将lisp的能力带到积木中,使用Snap! 可以轻松操作数据结构,很适合算法教学。


#4

真的是很不错的项目,让人很是惊讶。应该不是开源项目,可是作为算法教学的具体化很有参考价值


#5

snap! 是完全开源的呢: https://github.com/jmoenig/Snap


#6

这么好,那就可以好好研究研究了


#7

@yazguqi,

This online submission code for Snap has already implemented by two Student from my country (Belgium).

Try the 2014 version without submission (but the version with submission is in Github !)

https://rsnap.herokuapp.com

Source Code is on github :
[1] https://github.com/simonhock/rsnap

[2] https://github.com/simonhock/Snap--Build-Your-Own-Blocks

There are three roles : Teacher create lessons (split in chapters) and Snap exercices
Student : follow lessons and do exercices and submit his solution.
The teacher is warn if a new submission is made and correct the exercice and alllow or not the student to pass to another exercice.
And of course the administrator.


#8

I think it’s a very meaningful teaching project to do simple arithmetic by building blocks. This project gives a better teaching solution, which I like very much. Thank you very much for sharing with me. @Cyke