Logic101

Installation & Commands

Option A: Codespace (Recommended)

  1. Click this link to open a Codespace.
  2. GitHub will create a fully configured environment in your browser (takes about 1-2 minutes).
  3. Run l101 login in the terminal and follow the prompts to authenticate with GitHub.
  4. You're ready to code.
Codespace Auto-Stop

Your Codespace will automatically stop after 5-10 minutes of inactivity. Your work is saved in a private GitHub repository. Click the same link to resume where you left off.

Option B: Local Development

  1. Install Python 3.9 or later from python.org.
  2. Install the l101 CLI:
pip install l101
  1. Authenticate:
l101 login
  1. Pull the starter code:
l101 pull pset0
  1. Navigate to the directory:
cd ~/logic101/pset0
  1. You're ready to code.

CLI Commands

CommandDescription
l101 loginAuthenticate with GitHub (one-time). Opens a browser for OAuth.
l101 pull pset0Download or update starter code for a problem set.
l101 test namaste.pyRun visible tests on a file locally.
l101 submit pset0Submit all required files for grading (max 5 attempts per PSET).
l101 statusShow submission history, scores, and remaining attempts.
l101 logoutLog out and remove stored credentials.

Testing Workflow

  1. Write code — Edit the starter files in your Codespace or local editor.
  2. Test locally — Run l101 test namaste.py to check visible tests.
  3. Fix issues — If tests fail, read the output, fix your code, and re-run.
  4. Submit when confident — Run l101 submit pset0 to submit for grading.
  5. Review results — Check your score. If it's not full marks, fix the issues and resubmit.
Scoring

Each hidden test is worth 1 point. Your best score across all submissions is kept. There is no penalty for resubmitting. You have up to 5 attempts per problem set.

Python Basics Reference

Input and Output
name = input("What is your name? ")
print("Hello, " + name)
Variables and Strings
greeting = "Namaste"
name = "Aarav"
message = f"{greeting}, {name}"
print(message)
Conditions
language = input("Preferred language: ").lower().strip()

if language == "hindi":
    print("Namaste")
elif language == "bengali":
    print("Nomoshkar")
else:
    print("Hello")

Troubleshooting

l101: command not found

Make sure you've installed l101: pip install l101. If that doesn't work, try pip3 install l101.

Not authenticated. Run 'l101 login' first.

Run l101 login and follow the browser prompts to authenticate with GitHub.

No .l101.yml found

You need to be inside a problem set directory. Run l101 pull pset0 first, then cd ~/logic101/pset0.

Rate limit exceeded

You've used all your submission attempts for this problem set. Your best score is kept — no need to resubmit if you're satisfied.

Codespace won't start

Make sure you have a GitHub account. The Codespace link creates a private repository for your work. Check that your browser allows popups from github.com.