These instructions will walk you through a "Scavenger Hunt". These tasks will require you to use various Terminal commands (found in this reference) to accomplish a variety of tasks. You should record your progress in the Gradescope assignment.
You can find the starter files here. You should download ScavengerHunt.zip from Google Drive, unzip it (double click), and move the folder (ScavengerHunt) to the Desktop.
Now open the Terminal application. Using Spotlight (magnifying glass icon in the upper right of the computer or cmd-space), enter Terminal and click on the associated app. Its icon should be a black square with a > and a _.
From this point forward, all tasks will be done with the commandline. You can use the GUI to check your work, but not perform any of the tasks below.
Before you get started, familiarize yourself with the contents of the Terminal Reference as you'll need those commands throughout this scavenger hunt.
When you open the Terminal, you will start at ~ (your home directory). Find your way into the ScavengerHunt folder that we placed on the Desktop. (Desktop is a folder in your home directory.)
Once you're there, orient yourself by asking the Terminal for your absolute path.
Oscar the Grouch would like to get home. Let's help him. In the ScavengerHunt folder, create a new folder called SesameStreet. Inside the folder, create a new file called OscarsTrashCan.txt. Use the ASCII art below to place Oscar inside his trash can.
wwwwww
w"ww ww"w
W o""o W
W ______ W
"w \_\/_/ w"
ww""wwwwww""ww
||||||||||||
||||||||||||
||||||||||||
Help Mrs. Mallard lead her 8 ducklings from the Charles River to the Public Garden. In the MakeWayForDucklings folder, you'll find 2 additional folders. The ducklings (ducklings.txt) are currently in the CharlesRiver. Guide them safely to the PublicGarden, where they can grow up and have a good life.
How many Muppets are there in the Muppets folder? Are there any Muppets hiding?
Before we had IDEs (Integrated Development Environments), everyone ran their programs directly on the commandline. We can do the same for our Python code! Open up a Python Shell and try some code. Don't forget to exit out of python when you're done. (quit() or exit() should do it.)
What does the command true do? How about the command false?