Unit 0 Assignment
Command line, binary
AP Computer Science 2021-22 / Dr. Kessner
Practice numeric conversions
Practice all of these ten possible conversions:
decimal <-> binary, octal, hexadecimal
binary <-> octal, hexadecimal
Here’s a fun way to practice hex <-> decimal
: Find an RGB color picker
(Processing, Photoshop, Google). Pick a color. Look at the hex values,
convert to decimal RGB, and check your work. Do the same in reverse.
For the others, make up your own exercises and use Google or another online converter to check your work.
The Unit 0 Quiz will consist of 5 numeric conversions.
Practice using the command line
You won’t be tested on stuff related to the command line. However, you will be using the command line extensively this year. Think of your time spent practicing working on the command line as an investment that will save you time not only this school year, but any time you do any future work on the computer.
Here is a recommended exercise, but I also encourage you to practice on your own:
-
On paper, draw out a directory tree (2-3 levels deep) with some text files in various directories.
-
On the command line, create this directory tree. Look at your directory in Finder / Explorer to check your work.
Practice writing programs
Create a new directory and write the “Hello, world!” programs for both Python and Java from scratch. Make modifications to your programs, and re-compile and run.
A note on copying code
The code exercises are for you to practice using the ideas we discuss in class to solve problems you haven’t seen before. If you are stuck on a code exercise, you are absolutely welcome to get help from your classmates (or me, or the internet), and to look at their code.
However, remember that copying and pasting code into your own project will not help you get any better at solving problems or writing code yourself.
It is your responsibility as a student to understand how your code works, and to seek help if you’re not sure about something. If you and a classmate work together on anything, please make it clear which parts you worked on together, and which parts you did on your own.