Pathway W1000s Exercises

From Coder Merlin
Jump to navigation Jump to search

W1001 The Wiki[edit]

W1002 The Client, the Server, and the Shell[edit]

Template:W1002-Exercises

W1003 Help Me![edit]

W1004 Emacs[edit]

ExercisesIcon.png
Exercises

After completing W1008:

  •  M1004-10  Complete  Merlin Mission Manager  Mission M1004-10.

W1005 Digital Journal[edit]

ExercisesIcon.png
Exercises

Now that you've completed W1005, complete:

  •  J1002  Create a journal and answer all questions in W1002. Be sure to include all sections of the journal, properly formatted.

W1006 Source Control[edit]

ExercisesIcon.png
Exercises
  •  J1006  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  • Enter your Journals directory, then:
    • Initialize a git project in the directory.
    • Add all of your journals to git and commit these changes.
    • Going forward, it will be your responsibility to always add every journal to git. This includes any updates to your journals. Also, note that all content must be present within the git repository. Substituting links (e.g. Google Docs) for actual content is not acceptable.

After completing W1008:

  •  M1006-31  Verify your journal's conformance with  Merlin Mission Manager  Mission M1006-31.

W1007 GitHub[edit]

ExercisesIcon.png
Exercises
  • Push all of the journals in the Journals directory to GitHub and be sure to continue to push all new/modified journals as well. Note that this applies to essays and excursions as well.
  • Journals and essays should be stored in your "Journals" directory and pushed to your "Journals" repository.
  • Exercises and excursions should be stored in your "Experiences" directory and pushed to your "Experiences" repository.
  • Your final version of any exercise must be tagged as <ExerciseName>.Final. For example, for J1006, the file will be named J1006.txt (because it is a text file) and the final version should be tagged J1006.Final

W1008 Merlin Mission Manager[edit]

ExercisesIcon.png
Exercises
  •  J1008  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1008.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1008.Final
    • push your tag to GitHub
  •  J1002  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1002.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1002.Final
    • push your tag to GitHub
  •  J1006  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1006.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1006.Final
    • push your tag to GitHub
  • In the following order:
    •  M1008-10  Complete  Merlin Mission Manager  Mission M1008-10
    •  M1002-10  Complete  Merlin Mission Manager  Mission M1002-10
    •  M1004-10  Complete  Merlin Mission Manager  Mission M1004-10
    •  M1008-31  Complete  Merlin Mission Manager  Mission M1008-31
    •  M1002-31  Complete  Merlin Mission Manager  Mission M1002-31
    •  M1006-31  Complete  Merlin Mission Manager  Mission M1006-31

W1011 Number Systems[edit]

ExercisesIcon.png
Exercises
  •  M1011-10  Complete  Merlin Mission Manager  Mission M1011-10

W1012 Alternative Base Addition[edit]

ExercisesIcon.png
Exercises
  •  J1012  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1012.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1012.Final
    • push your tag to GitHub
  •  M1012-10  Complete  Merlin Mission Manager  Mission M1012-10
  •  M1012-31  Complete  Merlin Mission Manager  Mission M1012-31

W1013 Boolean Algebra[edit]

ExercisesIcon.png
Exercises
  •  J1013  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1013.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1013.Final
    • push your tag to GitHub
  •  M1013-10  Complete  Merlin Mission Manager  Mission M1013-10
  •  M1013-11  Complete  Merlin Mission Manager  Mission M1013-11
  •  M1013-12  Complete  Merlin Mission Manager  Mission M1013-12
  •  M1013-31  Complete  Merlin Mission Manager  Mission M1013-31

W1014 Logic Gates[edit]

ExercisesIcon.png
Exercises
  •  M1014-10  Complete  Merlin Mission Manager  Mission M1014-10

W1015 Bitwise Operations[edit]

ExercisesIcon.png
Exercises
  •  M1015-10  Complete  Merlin Mission Manager  Mission M1015-10

W1016 Logic Composition[edit]

ExercisesIcon.png
Exercises
  • For ALL of these exercises, you may use ONLY:
    • Wires
    • Logic Inputs
    • Logic Outputs
    • Two-input NAND Gates
  • Construct your work using Falstad's Editor
  • All circuits must be on a single page
  • Label the page (using Text) with:
    • Your name
    • The date
  • Begin each circuit with a Blank Circuit
  • Label each circuit diagram (using Text) with:
    • The name of the logic gate (e.g. "NOT")
  • Save the document using the Save As... option from the File submenu and then click on the link presented
  • The file contains your work for the exercise. Create a new subdirectory, J1016, in your Journals directory. Upload the file to the J1016 directory via SFTP. Be sure to push the file to your GitHub repository.

  1. Construct a NOT gate
  2. Construct an AND gate
  3. Construct an OR gate
  4. Construct an XOR gate
  5. Construct a NOR gate

W1016-Annex-1[edit]

ExercisesIcon.png
Exercises
  • For ALL of these exercises, you may use ONLY:
    • Single-pole, single-throw switches (one or more)
    • Single-pole, double-throw relays (one or more)
    • A power supply
    • A lamp for output
    • Wire
  • Each switch must control exactly one relay and each relay must be an integral part of the functioning circuit
  • Construct your work using Falstad's Editor
  • Begin each exercises with a Blank Circuit
  • Label each circuit diagram (using Text) with:
    • Your name
    • The date
    • The name of the logic gate (e.g. "NOT")
  • Export each circuit using the File | Export As Text... option from the menu bar
  • The text contains all of your work for the exercise. Select the entire text, copy it, and paste it into your journal using the correct exercise number.

  1. Construct a NOT gate
  2. Construct an OR gate
  3. Construct an AND gate
  4. Construct an XOR gate

Bonus:

  1. Construct a NAND gate
  2. Construct a NOR gate

W1017 Binary Adders[edit]

ExercisesIcon.png
Exercises
  •  J1017  Create a journal and answer all questions in this experience. Be sure to:
    • edit your journal using emacs within your ~/Journals directory
    • properly name your journal as J1017.txt
    • include all sections of the journal, properly formatted
    • push your changes to GitHub
    • properly tag your journal as J1017.Final
    • push your tag to GitHub

  • Construct your work using Falstad's Editor
  • All circuits must be on a single page
  • Label the page (using Text) with:
    • Your name
    • The date
  • Begin each circuit with a Blank Circuit
  • Label each circuit diagram (using Text) with:
    • The name of the logic gate (e.g. "NOT")
    • Each output (e.g. "sum", "carry out")
  • Save the document using the Save As... option from the File submenu and then click on the link presented
  • The file contains your work for the exercise. Create a new subdirectory, J1017, in your Journals directory. Upload the file to the J1017 directory via SFTP. Be sure to push the files to your GitHub repository.
  • You may use any of the following logic gates in your implementation: AND, OR, NOT, XOR, NAND, and NOR

  1. Construct a half-adder
  2. Construct a full-adder

  •  M1017-31  Complete  Merlin Mission Manager  Mission M1017-31

W1018 SR Latch[edit]

ExercisesIcon.png
Exercises
  • Visit the SR Latch in Falstad's editor here. Examine the output of an SR Latch, carefully toggling each of the inputs until you feel confident in your understanding of the latch.
  •  M1018-10  Complete  Merlin Mission Manager  Mission M1018-10

W1021 Computer History[edit]

ExercisesIcon.png
Exercises
  •  M1021-10  Complete  Merlin Mission Manager  Mission M1021-10

W1022 Computer Architecture[edit]

ExercisesIcon.png
Exercises
  •  M1022-10  Complete  Merlin Mission Manager  Mission M1022-10

W1037 Expressions[edit]

ExercisesIcon.png
Exercises

Exercises are deferred until W1040 Printing and String Interpolation

W1039 Conversions[edit]

ExercisesIcon.png
Exercises

Exercises are deferred until W1040 Printing and String Interpolation

W1040 Printing and String Interpolation[edit]

ExercisesIcon.png
Exercises
  1.  M1037-10  Complete  Merlin Mission Manager  Mission M1037-10
  2.  M1039-10  Complete  Merlin Mission Manager  Mission M1039-10
  3.  M1039-11  Complete  Merlin Mission Manager  Mission M1039-11

W1089 Hello World[edit]

ExercisesIcon.png
Exercises
  •  J1089  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  •  M1089-10  Complete  Merlin Mission Manager  Mission M1089-10

W1091 Algorithm Basics[edit]

ExercisesIcon.png
Exercises
  •  J1091  In your journal, produce the following, detailed descriptions:

  • Describe how you would make a peanutbutter and jelly sandwich.
  • Describe how you would make macaroni and cheese.
  • Describe how a batter should react to a pitch in a baseball game.

W1151 Conditional and Flow Chart[edit]

ExercisesIcon.png
Exercises
  1.  J1151  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2. Using Draw.IO and following the instructions DrawIO Saving a File, create the below flowcharts. Be certain to label each flowchart using the correct exercise number. Place the text into a file named J1151.xml and be sure to push it to GitHub when done.
    1. Create a flowchart for making a peanut butter and jelly sandwich
    2. Create a flowchart for turning on a lamp in a room. Each day, the lamp should be turned on at sunset and off at sunrise.
    3. Create a flowchart for proceeding straight through a four-way intersection with stop signs at each corner.
    4. Create a flowchart for proceeding straight through a four-way intersection governed by a traffic light.
    5. Create a flowchart for making a left turn at a four-way intersection governed by a traffic light (without a left-turning arrow).
  3.  M1151-10  Complete  Merlin Mission Manager  Mission M1151-10

W1152 While Loop[edit]

ExercisesIcon.png
Exercises
  1.  J1152  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2.  M1152-10  Complete  Merlin Mission Manager  Mission M1152-10

W1153 Repeat-While Loop[edit]

ExercisesIcon.png
Exercises
  1.  J1153  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2.  M1153-10  Complete  Merlin Mission Manager  Mission M1153-10

W1154 For Loop[edit]

ExercisesIcon.png
Exercises
  •  M1154-10  Complete  Merlin Mission Manager  Mission M1154-10
  •  M1154-20  Complete  Merlin Mission Manager  Mission M1154-20
  •  X1154  Using Draw.IO create a single XML file named "Flowcharts.drawio" with one page for each flowchart below. Create a new subdirectory, J1154, in your Journals directory. Upload the file to the directory via SFTP. Be sure to push the file to your GitHub repository. When done, tag the repository as J1154.Final.
    1. Finding the greatest number of three
    2. Finding the GCD of two numbers using Euclid's Algorithm
    3. Determining whether or not a number is prime

W1165 Karel Introduction[edit]

ExercisesIcon.png
Exercises
  1.  M1165-10  Complete  Merlin Mission Manager  Mission M1165-10
  2.  M1165-11  Complete  Merlin Mission Manager  Mission M1165-11

W1171 Largest Number of Three[edit]

ExercisesIcon.png
Exercises
  1.  M1171-10  Complete  Merlin Mission Manager  Mission M1171-10

W1172 Greatest Common Divisor[edit]

ExercisesIcon.png
Exercises
  1.  M1172-10  Complete  Merlin Mission Manager  Mission M1172-10

W1173 Finding Primes[edit]

ExercisesIcon.png
Exercises
  1.  M1173-10  Complete  Merlin Mission Manager  Mission M1173-10

W1205 Function Introduction[edit]

ExercisesIcon.png
Exercises
  •  M1205-10  Complete  Merlin Mission Manager  Mission M1205-10

W1292 Useful Randomness[edit]

ExercisesIcon.png
Exercises
  1. Write a program that randomly throws a series of N darts at a virtual dartboard as described above. At the conclusion of throwing N darts, the program should print an estimate for the value of π. Be sure to complete this part of the exercise in your ~/Experiences/W1292 directory.
  2.  J1292  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.

W1301 Arrays[edit]

ExercisesIcon.png
Exercises
  •  M1301-10  Complete  Merlin Mission Manager  Mission M1301-10

W1161 Basic Input[edit]

ExercisesIcon.png
Exercises
  1.  J1161  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2.  M1161-10  Complete  Merlin Mission Manager  Mission M1161-10

W1351 Swap Function[edit]

ExercisesIcon.png
Exercises
  1.  J1351  Create a journal and answer all questions in this experience. Be sure to include all sections of the journal, properly formatted.
  2.  M1351-10  Complete  Merlin Mission Manager  Mission M1351-10

W1352 Bubble Sort[edit]

ExercisesIcon.png
Exercises
  •  M1352-10  Complete  Merlin Mission Manager  Mission M1352-10

W1501 Introduction to Objects[edit]

ExercisesIcon.png
Exercises
  •  J1501  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  • Making use of your accumulated knowledge to date (loops, functions, coding style, etc.) and using only Rectangles and Text on a single canvas:
    1. Draw a single rectangle (without any text)
    2. Draw a grid (at least 3 x 3)
    3. Draw a brick wall (at least 5 x 5)
    4. Draw a pyramid constructed of bricks (at least seven rows high)
    5. Draw a skyscraper with a large sign on the roof containing your name
    6. Draw at least three skyscrapers of different heights on the same Canvas, each containing your name

W1502 Object Attributes[edit]

ExercisesIcon.png
Exercises
  •  J1502  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  • Continuing from your existing three skyscrapers:
    1. Color the sky and ground
    2. Color the body of each skyscraper in a different color
    3. Color various aspects of your skyscraper (e.g. windows, doors) in different colors

When done, you must have at least seven different colors on your canvas.

W1503 Lines and Ellipses[edit]

ExercisesIcon.png
Exercises
  •  J1503  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  • On a single canvas:
    1. Use your pyramid (built of "bricks") from previous exercises. Split your pyramid so that a few rows near the apex are separated from the body of the pyramid.
    2. Alter the pyramid so that these separated rows (on top) are drawn using a triangle (rather than by rows of bricks).
    3. Inside the triangle, draw an eye.
    4. Draw the entire pyramid in shades of green. (Use at least three different shades of green.)

W1504 First Steps on a Path[edit]

ExercisesIcon.png
Exercises
  •  J1504  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  • On a single canvas:
    1. Add at least five more eyelashes above the eye. Pay attention to the proper angle. (It will be helpful to PLAN this by using graph paper.)
    2. Change the color of the eyelashes to the color of your eyelashes.
    3. Change the color of the iris to match the color of your eyes.
    4. Move all of the code to draw the eye to a separate function, named "renderEye()". Invoke the function.
    5. Modify the function to accept a Point parameter, "location", which will specify the location of the eye.
    6. Invoke the renderEye() function twice using two different locations, placing the eyes at an appropriate distance apart.

W1505 Images[edit]

ExercisesIcon.png
Exercises
  •  J1505  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  1. Think of a theme for your composition. Add at least four different images to your canvas following your chosen theme. (You may remove the White House.) Remember to only use images that are licensed appropriately. The images may not overlap.
  2. At least one of the images must be scaled up (i.e. it must be larger than the original source).
  3. At least one of the images must be scaled down (i.e. it must be smaller than the original source).
  4. At least one of the images must be only partially displayed (i.e. the source rectangle does not include the entire image).
  5. Draw a rectangular frame around each image. Each frame must be a different color.

W1511 Walking Turtles[edit]

ExercisesIcon.png
Exercises
  •  J1511  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted.
  1. Draw a pentagon
  2. Draw an octagon
  3. Create a function to draw an n-gon (a polygon with n sides) where sides is a parameter to the function specifying the number of sides and length is a parameter to the function specifying the length of each side. Use your function to draw at least three n-gons, each with no fewer than eight sides. All n-gons should appear on the same canvas at the same time.
  4. Create another function that draws a house. The house must have at least two windows and one door. This should be drawn on another location on your canvas and be visible at the same time as the n-gons.
  5. Draw a "circle"

W1512 Colorful Turtles[edit]

ExercisesIcon.png
Exercises
  •  J1512  Create a journal and answer all questions. Be sure to include all sections of the journal, properly formatted. Upload an image of your graph paper drawing using an appropriate filename which includes "J1512" (such as J1512.png).
  1. Produce a new pattern by repeatedly drawing a polygon (of no fewer than five sides) of various sizes at various angles. Define your own color scheme and rotate through the colors.
  2. Before drawing your pattern, render to the canvas an aesthetic background using the drawing primitives that were covered in earlier projects (e.g. Ellipses, Rectangles, Images).

W1513 Patterns of Patterns[edit]

ExercisesIcon.png
Exercises
  • Produce all patterns specified above using graphic functions and the correct function name. (You may not use the Image class.)

W1521 Moving Along[edit]

ExercisesIcon.png
Exercises
  • Alter the Background so that the screen is cleared during each render cycle. Then click on the canvas again and demonstrate that the ball appears to move as the mouse is clicked.
  • Alter the Background so that the top half of the screen appears to be a sky of blue and the bottom half appears to be grass of green
  • Add at least three additional outdoor shapes to the Background using at least three additional colors. This is your creation, so feel free to use your imagination rather than going for the straight-forward sun, clouds, and trees.
  • Alter the Ball so that rather than responding to onEntityMouseClick events, it responds to onMouseMove events. To do so, conform to protocol MouseMoveHandler, and register and unregister with the dispatcher (registerMouseMoveHandler, unregisterMouseMoveHandler). The signature for onMouseMove is:
    func onMouseMove(globalLocation: Point, movement: Point)

W1522 Ping Then Pong[edit]

ExercisesIcon.png
Exercises
  1. Complete the Ball.calculate(canvasSize:) to properly handle bounces along the y axis
  2. Implement a power bounce such that immediately after a collision with the canvas edge the ball accelerates to twice its original velocity then slows back to that original velocity over several frames
  3. Whenever a collision occurs, deform the ball (squish it) in the direction of the collision then restore it back to its original dimensions over several frames

W1523 Paddle Paddle[edit]

ExercisesIcon.png
Exercises
  1. Use print statements to investigate the arguments provided to the onKeyDown event handler
  2. Select sensible keys to be used to move the left paddle up and down and to move the right paddle up and down
  3. Implement the required code to actually move the paddles in accordance with your selected keypresses

W1524 Score![edit]

ExercisesIcon.png
Exercises
  1. Ensure that paddles can't be moved off (above or below) the screen
  2. Add hit detection to the Paddle class
  3. If a ball strikes a paddle it should be deflected
  4. Add a scoreboard which will track the score of the game, incrementing the opponents score by 1 each time the ball strikes the wall

W1525 Containment[edit]

ExercisesIcon.png
Exercises
  1. Refactor all hit detection to rely only upon Containment
  2. Animate at least five background objects, at least three of which must be different instances of the same class

W1527 Team Play[edit]

ExercisesIcon.png
Exercises
  • Refactor your application to enable team play, i.e. two people on different computers playing the same game at the same time. The background must remain independent for each session.

== W1528 Private Means Private

ExercisesIcon.png
Exercises
  • Refactor your application using appropriate access modifiers by producing a well-planned, well-defined, and well-implemented interface and hiding all other methods and properties.


Designed with pride in Silicon Valley, CA, USA