one-of-k 編碼算法
by Christopher George
克里斯托弗·喬治(Christopher George)
我們如何教K-12學生如何編碼 (How we’re teaching K-12 students how to code)
Hello World! (Sorry, I couldn’t resist.) My name is Christopher George and I am currently a Junior at Carnegie Mellon University studying Intelligent Computer Systems for Visualization.
你好,世界! (對不起,我無法抗拒。)我的名字叫克里斯托弗·喬治,我現在是卡內基·梅隆大學的一名大三學生,研究可視化智能計算機系統 。
Since starting university, I have gained an appreciation for quality computer science education.
自從上大學以來,我已經對高質量的計算機科學教育產生了贊賞。
I work for a project on campus called CMU CS Academy (Carnegie Mellon University Computer Science Academy), the purpose of which is to bring a free, world-class computer science curriculum to the high school level.
我在一個名為CMU CS學院 (卡內基梅隆大學計算機科學學院)的校園項目中工作,目的是將免費的 世界一流的 計算機科學課程引入高中。
CMU CS Academy is the topic of this article. Throughout this post, I will have gifs and pictures to show the capabilities of the curriculum and platform as a whole.
CMU CS學院是本文的主題。 在整個這篇文章中,我將提供gif和圖片來顯示課程和平臺的整體功能。
All media used in this article was created using the CMU CS Academy graphics package.
本文使用的所有媒體都是使用CMU CS Academy圖形包創建的。
什么 (The What)
CMU CS Academy is an entirely free online 9th grade computer science curriculum.
CMU CS學院是完全免費的在線9年級計算機科學課程。
“Think, Khan Academy on steroids.”
“想想,汗學院研究類固醇。”
“This isn’t ‘drag and drop’ programming. We’re teaching [kids] to use Python, a text-based programming language that is the most widely taught language at the university level.” Professor David Kosbie
“這不是'拖放'編程。 我們正在教孩子們使用Python,這是一種基于文本的編程語言,是大學水平上使用最廣泛的語言。” David Kosbie教授
Currently, CMU’s CS Academy is running its second pilot program of its initial course offering, a 9th grade CS1, Intro to Programming and Computer Science. The course uses a custom graphics package written in Python to introduce students to the programming and problem solving skills required in Computer Science. It requires no prerequisite other than algebra readiness. The Program has 40 participating high schools across the United States and in Rwanda with over 1000 students using the curriculum.
目前,CMU的CS學院正在運行其初始課程產品的第二個試點計劃,即9年級CS1,即編程和計算機科學入門。 該課程使用以Python編寫的自定義圖形包向學生介紹計算機科學所需的編程和解決問題的技能。 除了代數準備就緒,它不需要任何先決條件。 該計劃在全美和盧旺達有40所參與的中學,有1000多名學生在使用該課程。
Students learn how to code by creating drawings, animations and games all in Python. The best way to explain to you how awesome this is, and what this offers 9th graders, is to show you what can be done with CMU CS Academy. Here is a small showcase of exercises that students complete as part of the curriculum. (The entire curriculum has over 255 auto-graded exercises.)
學生通過全部使用Python創建繪圖,動畫和游戲來學習編碼。 向您解釋這真是太棒了,這為9年級學生提供了什么,最好的方法是向您展示CMU CS學院可以做什么。 這是學生作為課程一部分完成的小練習展示。 (整個課程包含超過255個自動評分練習。)
The curriculum is intended to be taught in a high school setting for students ready to take algebra.
該課程旨在在高中環境中為準備學習代數的學生講授。
Students, if you visit the website, and find it interesting, fun, or worthwhile, I would heavily advise you to talk to your schools.
學生們,如果您訪問該網站 ,發現它有趣,有趣或有價值,我會極力建議您與您的學校談談。
Teachers, if you don’t already have a 9th grade computer programming course, start one! It’s here. Just take it. We are trying to give it to you! Teach your kids how to code!
老師,如果您還沒有9年級計算機編程課程,那就開始吧! 它在這里。 拿著吧。 我們正在努力把它給你! 教您的孩子如何編碼!
我們提供什么 (What we offer)
CMU CS Academy isn’t just a free curriculum, but an entire online textbook that is student paced. Again — Think, Khan Academy on steroids.
CMU CS學院不僅是免費課程,而且是由學生調整的整個在線教科書。 再說一遍- 想想,汗學院關于類固醇。
- The teacher is the guide, the leader, the debugger, through the twisted and treacherous journey that is code. 老師是向導,領導者,調試器,這是代碼的曲折而險惡的旅程。
- At the publication of this article, CMU CS Academy has over 255 exercises, that are entirely auto-graded. Meaning, a teacher will not have to sit for hours grading exercise after exercise until the wee hours of the night. 在本文發表時,CMU CS學院有255多個練習,這些練習是完全自動評分的。 意思是,直到晚上凌晨,老師不必在運動后的幾個小時內進行分級鍛煉。
Visit our website to see what else there is
訪問我們的網站,看看還有什么
為什么 (The Why)
Software developers, computer engineers, designers, architects, school teachers, writers, dancers, everyone benefits when they know how to code.
軟件開發人員,計算機工程師,設計師,建筑師,學校教師,作家,舞蹈家,每個人都可以在知道如何編碼的同時受益。
There’s been a push recently across the US (and the world) to better prepare kids for this technological revolution. This project, and this opportunity, is where that preparation will start.
最近,美國(乃至全世界)都在努力為孩子們更好地為這場技術革命做準備。 這個項目和這個機會是準備工作的起點。
CMU CS Academy is meant to bridge the gap between Scratch’s block-based code and the AP Computer Science classes later in high school.
CMU CS學院旨在彌合Scratch基于塊的代碼與高中以后的AP計算機科學課程之間的差距。
如何 (The How)
‘So, Chris? How exactly do I go about getting this curriculum into my 9th grade class? How do I get my kid to learn this stuff?’
“那么,克里斯? 我應該如何將這門課程納入我的9年級課程? 我如何讓我的孩子學習這些東西?
老師/學校管理員 (Teacher/ School Administrator)
If you are a teacher or administrator, you can make a demo account on our website now!
如果您是老師或管理員,您可以現在在我們的網站上注冊一個模擬賬戶!
- That will give you a preview of the notes and exercises that are available with the course. 這將為您提供該課程提供的筆記和練習的預覽。
- From there, you can get in contact with our program manager to set up a full teacher account (through the website). 您可以從那里與我們的計劃經理聯系,以建立完整的教師帳戶(通過網站)。
學生/家長/其他任何人 (Student/ Parent/ Anyone else)
If you aren’t directly affiliated with a school, but still want this in your district, you can and should reach out to your school administration and ask them to look into us. Badger them about it! Send them to our website!
如果您不是學校的直接下屬,但仍希望在您所在的地區,則可以并且應該與您的學校行政部門聯系,請他們調查我們。 them一下吧! 將它們發送到我們的網站!
You could also find a teacher that is already teaching a programming course, (probably created in the 1980's) show them the website, and watch as their eyes become glossy and they squeal with excitement.
您還可以找到一位已經在教授編程課程的老師(可能是1980年代創建的),向他們展示網站,并看著他們的眼睛變得光亮,激動地尖叫著。
結語 (Wrap Up)
Finally, you can go and explore the website, and all of it’s glory now. There is a Sandbox mode where you can write whatever program you like. The Docs are also helpful for anyone just looking to play around with the graphics package.
最后,您可以瀏覽該網站 ,現在所有的榮耀。 在沙盒模式下,您可以編寫所需的任何程序。 Docs對于那些只希望使用圖形包的人也很有幫助。
Below, I will have a few sample exercises that I made real fast, but know the possibilities of this platform are endless, as you are writing pure Python in browser.
下面,我將提供一些示例練習,這些練習很快就實現了,但是您知道在使用瀏覽器編寫純Python時該平臺的可能性是無限的 。
筆記 (Notes)
Anyone experienced with graphics packages in Python might notice a distinct lack of MVC. This and all other aspects of the graphics package were settled on after an immense amount of debate about the pedagogical purposes of the platform. They were decided, in part, based on what we thought would be the easiest way for a 9th grader to learn to code.
任何使用過Python圖形包的人都可能會注意到MVC的明顯不足。 在對該平臺的教學目的進行了大量辯論之后,解決了圖形包的所有方面。 他們的決定部分是根據我們認為的九年級學生學習編碼的最簡單方法而定的。
As promised, here are some code samples to have fun with! As well as all of the links :)
如所承諾的,這里有一些有趣的代碼示例! 以及所有鏈接:)
鏈接 (Links)
Here’s the CMU CS Academy Website. If you are a teacher/administrator, you can make a demo account. If you are anyone else, you can play around in the Sandbox and make something awesome.
這是CMU CS學院網站 。 如果您是老師/管理員,則可以創建一個模擬帳戶。 如果您是其他人,則可以在“沙箱”中玩轉,并做出令人敬畏的東西。
Another resource through CMU is Teknowledge. A CMU student organization which has a number of free curricula for teaching coding in an after school setting. We have a middle school curriculum (open sourced through Google), high school machine learning curriculum, and a high school android app development curriculum.
通過CMU的另一個資源是Teknowledge 。 一個擁有大量免費課程的CMU學生組織 用于在放學后教授編碼。 我們有中學課程 (通過Google開放源代碼), 高中機器學習課程和高中android應用開發課程 。
Here is a CMU Press release about CMU CS Academy.
這是有關CMU CS學院的CMU新聞稿。
代碼樣例 (Code Samples)
backRects = Group()def drawRects(): for i in range(20): backRects.add(Rect(200, 200, 100, 100, fill=rgb(randrange(0, 255), 255, 255), align='center')) Rect(200, 200, 100, 100, fill='white', align='center') drawRects()
def onMouseMove(mouseX, mouseY): currentDistance = distance(200, 200, mouseX, mouseY) angle = angleTo(200, 200, mouseX, mouseY) for r in backRects.children: newX, newY = getPointInDir(200, 200, angle, currentDistance) r.centerX = newX r.centerY = newY currentDistance /= 2
app.background = 'black'dots = Group()
def onMousePress(mouseX, mouseY): for i in range(10): c = Circle(mouseX, mouseY, randrange(1, 20), fill='white') c.dx = randrange(-30, 30, 5) c.dy = randrange(-30, 30, 5) c.line = Line(mouseX, mouseY, mouseX, mouseY, fill='white') dots.add(c)
def onStep(): for d in dots.children: d.centerX += d.dx d.centerY += d.dy if (d.centerX < 0 or d.centerX > 400 or d.centerY < 0 or d.centerY > 400): dots.remove(d) d.line.x2 = d.centerX d.line.y2 = d.centerY
To finish, this is an opportunity that you as a teacher, student, or citizen of the world should be excited about. I know I am!
最后,這是您作為老師,學生或世界公民應該感到興奮的機會。 我知道我是!
So please… reach out to your schools and show them the possibilities!
因此,請……與您的學校聯系,向他們展示各種可能性!
Happy Coding :)
快樂編碼:)
翻譯自: https://www.freecodecamp.org/news/how-were-teaching-k-12-students-how-to-code-e0dcc31192db/
one-of-k 編碼算法