This coding camp is designed for high schoolers or college students who are considering pursuing computer science as their area of study.

The virtual camp is organized into three “weeks”, or 5 days of boot-camp-like learning. To be successful, on each day of the “week”, students must complete the daily assignment and seek help if stuck. At the end of each “week”, students should present a demo of their individual or team project.

The pilot camp was held in the summer of 2021 and attended by five 10th-graders. This page shared the learning materials that I have put together for this small group of students.

Week 1 – Web Development

Week 2 – Learn Python

——————————————————————————————-
Before Week 2 Starts, please set up Python Environment so you can follow along tmw
——————————————————————————————-
Setup  Python in Visual Studio Code: https://code.visualstudio.com/docs/languages/python (edited) 
Learn about Visual Studio Code as a Python IDE (code completion, debugging, lining).

Lesson Material

Homework:
Bonus
  • Build a Dice Throwing game  based on the Coin Flip
  • Checkout PyGame site https://www.pygame.org/news and build a simple game to share

Tech Demo – A Python Site using Flask

https://github.com/jess1sd/pythonsite.git
^ to run this
Run this at the terminal
pip3 install flask
python3 app.py
https://www.w3schools.com/python/python_functions.asp
def my_function():
  print("Hello there from a function")


def your_function(fname):
  print("Hello there from a function" + fname)
Words;
  • Method Signature
Homework for Day 2
Homework Challenge 1: Create a simple python vocabularies quiz
  • Contains a dictionary of words (key is the word, and value is the definition)
  • When run, randomly select a word from this dictionary, print the definition, and ask for the word
  • At the first guess, if it’s not right, give the first letter of that word as a clue but don’t exit the program
  • At the second guess, if it’s still not right, give the last letter of that word as a clue but don’t exit the program
  • At the third guess, if it’s still not right, print the right answer and exit
  • Hint1: Use a variable to keep track of how many failed guesses there are
Homework Challenge 2:
  • Ask each word at least once (so don’t exit after a word was guessed wrong)
  • Keep track of the number of words that are right
  • Print the total score (in percentage)
  • Hint1: Use list to keep track of the words already asked, and if the randomly chosen word is already asked, pick another one.
Homework Challenge 3:
  • Store that word list in a “CSV” file
  • Read the word list from the CSV file (see Python File Open)
  • Tip1: Store each word and its definition like fustigate,to criticize harshly (with a , delimiter)
  • Tip2: Store the file in the same directory

Hi all, this is the git repo with the quiz code
https://github.com/jess1sd/pythonquiz

 

Here is what each Python file does:
  • Step 1: Create a words dictionary, and randomly select an item to ask a question
  • Step 2: Populate the words dictionary from a CSV file
  • Step 3: Ask the user to choose which quiz to take, then randomly select a question from that quiz
  • Step 4: Ask the user to select a quiz category, then ask randomly selected questions from a randomly selected quiz
  • Step 5: Further clean up code by creating a quiz_common module

 

Week 3 – Learn Java

Set up

To set up your java environment, please follow
https://code.visualstudio.com/docs/languages/java

Class Material

https://docs.oracle.com/javase/tutorial/java/TOC.html

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html

 

public class App {
    public static void main(String[] args) throws Exception {
        System.out.println("Hello, World!!!!");

        int a = 10;
        int b = 10;
        System.out.println("a=" + a);
        System.out.println("b=" + b);
        System.out.println("binary a=" + convertIntegerToBinary(a));
        System.out.println("binary b=" + convertIntegerToBinary(b));

    }
    
    public static String convertIntegerToBinary(int n) {
        if (n == 0) {
            return "0";
        }
        StringBuilder binaryNumber = new StringBuilder();
        while (n > 0) {
            int remainder = n % 2;
            binaryNumber.append(remainder);
            n /= 2;
        }
        binaryNumber = binaryNumber.reverse();
        return binaryNumber.toString();
    }
}

 

Demonstrate Binary operation

public class App {
    public static void main(String[] args) throws Exception {
        System.out.println("Hello, World!!!!");

        int a = 10; // 0x1010

        // 0000 => 0 
        // 0001 => 1
        // 0010 => 2 
        // 0011 => 3
        // 0100 => 4 
        // 0101 => 5
        // 0110 => 6 
        // 0111 => 7
        // 1000 => 8   
        // 1001 => 9
        // 1010 => 10   

        int b = 0;


        System.out.println("b=" + b);

        // Use AND operation
        // int c = a & b;
        // System.out.println("c=" +c);

        // -----
        // bit mask = > take a binary number and apply AND on another binary number
        // value =        1111
        // mask  =        0000
        // value & mask = 0000

        // value =        1111
        // mask  =        0101
        // value & mask = 0101 


        System.out.println(convertIntegerToBinary(0));
        System.out.println(convertIntegerToBinary(1));
        System.out.println(convertIntegerToBinary(2));
        System.out.println(convertIntegerToBinary(3));

        // AND operator
        int v1 = 10; //1010
        int v2 = 8;  //1000
        int andVal = v1 & v2;
        System.out.println("andVal=" + andVal ); //should be 1000 (8)

        // OR operator
        int v3 = 10; //1010
        int v4 = 8;  //1000
        // expected    1010 =? 10
        int orVal = v3 | v4;
        System.out.println("orVal=" + orVal ); //should be 1010 (10)

        // XOR operator (if and only if one is true)
        int v5 = 10; //1010
        int v6 = 8;  //1000
        // expected    0010 = 2
        int xorVal = v5 ^= v6;
        System.out.println("xorVal=" + xorVal ); //should be 0010 (2)        
        


        System.out.println("binary b=" + convertIntegerToBinary(b));

    }

    public static String convertIntegerToBinary(int n) {
        if (n == 0) {
            return "0";
        }
        StringBuilder binaryNumber = new StringBuilder();
        while (n > 0) {
            int remainder = n % 2;
            binaryNumber.append(remainder);
            n /= 2;
        }
        binaryNumber = binaryNumber.reverse();
        return binaryNumber.toString();
    }
}

Repo

https://github.com/jess1sd/java-intro