Posted: Tue, 04/26/2022 - 8:04 pm EDT
This resource was created for CS for All Teachers by Community Ambassador, Rebekah Lang. Rebekah has used CodingBat.com for Java in her 2021-22 AP Computer Science A course and her co-author Kipung Park has used it to teach introductory Python. This guide will help teachers use CodingBat.com to easily and efficiently assign, check, and grade their students in Java and Python code.
CodingBat is a free website full of Java and Python coding problems designed to help students practice coding concepts and receive immediate feedback. It was created by Nick Parlante, a computer science teacher at Stanford, as a way to let students practice single concepts with built-in tests without having to code entire programs, understand unit-testing, or download an integrated development environment (IDE).
CodingBat has plenty of built-in problems that teachers can assign to students, but what makes it stand out from other coding question banks is that it allows teachers to write their own questions with tests.
This resource guide will walk you through the registering of a CodingBat.com teacher and student accounts, and writing, assigning, and evaluating custom problems in both Java and Python.
Registering a Teacher Account:
For Teachers to register, go to CodingBat.com and click “create account” in the top right corner.
You will be brought to a screen that looks like this:
Fill in the information as any other account-making process. After that, students will need to set up their accounts with your email address as a teacher, which is explained below in more detail.
For students to register, they should go to CodingBat.com and click “create account” in the top right corner.
They will be brought to a screen that looks like this:
Next, students should click on “prefs” in the top right corner:
Under “prefs,” students should update the “Teacher Share” field with their teacher’s email to allow their teacher to view their work, and add their name to the “Memo” field for easy identification. I give the instruction to put their name in “Last, First” order, since CodingBat allows teachers to sort by “Memo” alphabetically.
Creating Custom Problems:
Here are the directions on Authoring problems: https://codingbat.com/authoring.html
Every teacher's account has their own home page. It will be at https://codingbat.com/home/yourEmailAddress.
Here's how it looks:
From there, click on "Authoring," and then "New Problem," to get this view:
This is the space where the problem is created.
Here's what the “sumOfSquares” problem looks like on that page:
The Authoring Docs link shared above walks you through each of these textboxes and explains what you can include and what inputs won't work.
Assigning Problems to Students:
Teachers can assign individual problems to students by sharing the URL of the problem with the student. For example, the URL for helloName is circled and highlighted here:
However, if teachers wish to assign a custom set of problems to students, rather than assigning individual URLs, teachers can create a Custom Page to share with students.
To do this, go to your homepage: https://codingbat.com/home/yourEmailAddress.
It will look like this:
Then, enter a name and click the New Page button here:
On this custom page, list all of the problem IDs that you wish to include in the assigned set.
These problem IDs are automatically assigned as part of the URL when you create the problem. Here:
Don’t forget the “p” at the beginning of the problem number!
To assign a problem set, open the first problem in the set, and share that URL with students. Then, they can access all of the problems in the set by clicking “next” through the rest of the assigned problems.
Here is an example of a problem from the Recursion-1 set with the “next” button circled:
When students click “Go” after coding a solution, CodingBat will check their code with the test cases you provided. The result will look something like this:
Viewing Student Work:
To view student progress, go to the “report” section.
Once you click “report,” you will see a screen similar to this:
Under the “User ID” column you will be able to see your students’ emails. Under the “Memo” column, you will see students’ names if you let them know to include their names when setting up their accounts. Using the checklist under the title “Teacher Report,” you can select or deselect options to see different results depending on the problems, or even by memo.
If you have assigned a custom set of problems, you can use the Custom page filter by entering the name of that custom page here:
If the student has completed the given assignment, you will see a score of 1 point for each completed problem in the set on the right columns after the Memo column.
To see more specific progress or their work history, click on their email (which is their ID), found under the User ID column, and you will see something like this:
CodingBat.com is useful for practicing and assigning both Java and Python programs to students because of the easily customizable problem sets, built-in code checking and progress reports. Teachers can not only quickly see how successful students are with the assignments, but how many times they attempted to code each solution successfully. The green check mark that appears when a piece of code passes all tests is very satisfying and students largely enjoy completing work on this platform.
CodingBat’s big limitation is that it does not work with static methods or classes, so it’s only useful for the simpler pieces of bigger assignments. I have worked within this limitation by assigning larger programs and then asking students to submit smaller methods that are part of the larger programs to CodingBat for a progress check.
This material is based upon work supported by the National Science Foundation under Grant No. 1836310. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.