Skip to content

feat: adds lesson_07 homework and lesson_08 pre-work #303

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/check_lesson_07_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Check Lesson 07 Pull Request

on:
pull_request:
branches: [ "main" ]
paths:
- "lesson_07/conditionals/**"

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Build Shared Lib with Node.js
working-directory: ./lib/javascript/codedifferently-instructional
run: npm ci

- name: Build Lesson 07 with Node.js
working-directory: ./lesson_07/conditionals
run: |
npm ci
npm run test
7 changes: 7 additions & 0 deletions .github/workflows/check_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "lesson_03/quiz/**"
- "lesson_06/quiz/**"
- "lesson_06/expression/**"
- "lesson_07/conditionals/**"
jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -86,3 +87,9 @@ jobs:
run: |
npm ci
npm run compile

- name: Build Lesson 07 with Node.js
working-directory: ./lesson_07/conditionals
run: |
npm ci
npm run compile
2 changes: 1 addition & 1 deletion lesson_00/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 00 - Developer Workflow: Git Fundamentals ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_00))
# Lesson 00 - Developer Workflow: Git Fundamentals ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_00))

## Slides

Expand Down
2 changes: 1 addition & 1 deletion lesson_01/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 01 - Developer Workflow: IDE Fundamentals ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_01))
# Lesson 01 - Developer Workflow: IDE Fundamentals ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_01))

## Pre-work

Expand Down
2 changes: 1 addition & 1 deletion lesson_02/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 02: Developer Workflow: Navigating the Terminal ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_02))
# Lesson 02: Developer Workflow: Navigating the Terminal ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_02))

## Pre-work

Expand Down
2 changes: 1 addition & 1 deletion lesson_03/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 03: How Computers Work ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_03))
# Lesson 03: How Computers Work ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_03))

## Pre-work

Expand Down
2 changes: 1 addition & 1 deletion lesson_04/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 04: How to Be A Great Software Engineer ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_04))
# Lesson 04: How to Be A Great Software Engineer ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_04))

## Pre-work

Expand Down
2 changes: 1 addition & 1 deletion lesson_05/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 05: Software Development Life Cycle ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_05))
# Lesson 05: Software Development Life Cycle ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_05))

## Pre-work

Expand Down
2 changes: 1 addition & 1 deletion lesson_06/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 06: Statements and Variables ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_06))
# Lesson 06: Statements and Variables ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_06))

## Pre-work

Expand Down
12 changes: 10 additions & 2 deletions lesson_07/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Lesson 07: Control Flow ([Slides](https://code-differently.github.io/code-differently-24-q4/slides/#/lesson_07))
# Lesson 07: Control Flow ([Slides](https://code-differently.github.io/code-differently-25-q1/slides/#/lesson_07))

## Pre-work

Expand All @@ -10,4 +10,12 @@ Please review the following resources before lecture:

## Homework

- [ ] TODO(anthonydmays): Add homework details
- [ ] Complete [Conditionals and Loops](#conditionals-and-loops) exercise.
- [ ] Do pre-work for [lesson 08](/lesson_08/).

## Conditionals and Loops

This exercise will provide you ample opportunities to practice your understanding of conditional expressions and loops. To complete this assignment, implement the functions in [lesson7.ts][lesson7-file] and in the code file for your assigned homework group, ensure the tests pass, and submit a PR. Remember to use the [Conventional Commits][conventional-commits] spec for your commit messages and pull requests.

[lesson7-file]: ./conditionals/src/lesson7.ts
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/
8 changes: 8 additions & 0 deletions lesson_07/conditionals/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
insert_final_newline = true
1 change: 1 addition & 0 deletions lesson_07/conditionals/.env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HW_VERSION=your homework version here
1 change: 1 addition & 0 deletions lesson_07/conditionals/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
3 changes: 3 additions & 0 deletions lesson_07/conditionals/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Ignore artifacts:
build
coverage
1 change: 1 addition & 0 deletions lesson_07/conditionals/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
15 changes: 15 additions & 0 deletions lesson_07/conditionals/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check

import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.strict,
...tseslint.configs.stylistic,
eslintConfigPrettier,
{
ignores: ["build"],
},
);
11 changes: 11 additions & 0 deletions lesson_07/conditionals/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
export default {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest", { useESM: true }],
},
moduleNameMapper: {
"^(\\.\\.?\\/.+)\\.js$": "$1",
},
extensionsToTreatAsEsm: [".ts"],
};
Loading
Loading