2C — Switch Languages

You learned the basics in Python. Now prove they carry over to an approved language.

This Level Is for You If…

  • You finished Unit 1 in Python, on the Core or Extended track, and Python feels comfortable.
  • You finished Unit 1 without getting stuck on the core concepts.
  • You're up for learning new syntax. That's the challenge here, so the fundamentals need to be solid already.

2C is a sideways move, not a step up. The program itself is at the 2A level, because learning a new language is the stretch.

If you did Unit 1 on the Your Language track, you're already building in your language. Ask your teacher which Unit 2 level suits you instead.

What You'll Build

A program from the problem menu (calculator-type tool, quiz engine, or simple tracker), written entirely in your new language, at the 2A level. Alongside it, you'll keep a translation log showing how each Python idea carries over.

Approved languages

Only use a language from this list. It's the list of languages that work on the lab computers.

LanguageVS Code extensionAlso needsDay-one check
JavaScript (in the browser) Nothing to add, it's built into VS Code A browser (Chrome or Edge), which is already there Open your index.html in the browser, press F12, and click Console. You should see your hello message.

More languages may be added once they're confirmed on the lab computers.

Your hello world (CP1)

In your Unit 2 project folder, make two files:

index.html

<!DOCTYPE html>
<html>
  <head>
    <title>My Project</title>
  </head>
  <body>
    <h1>My Project</h1>
    <script src="main.js"></script>
  </body>
</html>

main.js

console.log("Hello, world!");
alert("Hello, world!");

Open index.html in your browser (double-click it in File Explorer, or right-click → Open with → Chrome). You should get a pop-up, and the message in the Console. Commit it. That's your CP1 hello world.

"Console program" in the browser: JavaScript in the browser doesn't have a terminal. Use prompt() for input and alert() or console.log() for output, or build a simple HTML page with an input box. Either is fine. Your design-cycle work is what's assessed, not how fancy the interface is.

Requirements Checklist

Your finished project must include all of these. (Ticking the boxes is just for you, it doesn't save.)

AI matters extra here. Asking AI how to write something in a new language is a normal way to learn it. Log it, though: note where you asked AI to translate something, and whether you understood what came back. When your teacher calls you up, you'll be asked to explain rows of your translation log.

Translation log example

ConceptPythonJavaScriptWhat surprised me
Loop over a list for item in items: for (const item of items) { Curly braces instead of indentation, and const inside the loop

Checkpoints at 2C

CheckpointWhat it looks like at 2C
CP1 Pitch names the language; pseudocode (not written in any language); hello world running in the new language, committed
CP2 Menu runs with two features working; translation log started with at least 3 rows; test table written
CP3 All tests recorded; translation log complete; reflection written; shown to a peer

Remember to start each checkpoint commit with CP1:, CP2: or CP3:, and push before your teacher calls you up.

Hello world early. If you can't get hello world running early on, talk to your teacher. A setup problem that eats the early part of the project sinks the whole project, so you may be moved to 2B instead.

When You're Stuck

  • Write it in Python first. Get it working, then translate one function at a time.
  • Use the official docs. For JavaScript, that's MDN.
  • Ask another 2C student. You're learning the same things at the same time.
  • Check the Console. JavaScript errors in the browser show up in the Console (F12), with the line number.

Done Looks Like…

Your program works as well as a strong 2A project, and your translation log shows you understand why the new language does things differently, not just that you found the right syntax.