Pathway W1000s Exercises

From Coder Merlin
Revision as of 02:19, 14 April 2021 by Mukul-agarwal (talk | contribs) (Add W1089 Exercises)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

W1001 The Wiki[edit]

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

Template:W1002-Exercises

W1003 Help Me![edit]

W1004 Emacs[edit]

Template:W1004-Exercises

W1005 Digital Journal[edit]

Template:W1005-Exercises

W1006 Source Control[edit]

Template:W1006-Exercises

W1007 GitHub[edit]

ExercisesExercisesIcon.png
  • 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]

Template:W1008-Exercises

W1011 Number Systems[edit]

Template:W1011-Exercises

W1012 Alternative Base Addition[edit]

Template:W1012-Exercises

W1013 Boolean Algebra[edit]

Template:W1013-Exercises

W1014 Logic Gates[edit]

Template:W1014-Exercises

W1015 Bitwise Operations[edit]

Template:W1015-Exercises

W1016 Logic Composition[edit]

ExercisesExercisesIcon.png
  • 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]

ExercisesExercisesIcon.png
  • 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]

Template:W1017-Exercises

W1018 SR Latch[edit]

Template:W1018-Exercises

W1021 Computer History[edit]

Template:W1021-Exercises

W1022 Computer Architecture[edit]

Template:W1022-Exercises

W1037 Expressions[edit]

Template:W1037-Exercises

W1039 Conversions[edit]

Template:W1039-Exercises

W1040 Printing and String Interpolation[edit]

Template:W1040-Exercises

W1089 Hello World[edit]

Template:W1089-Exercises

W1091 Algorithm Basics[edit]

Template:W1091-Exercises

W1151 Conditional and Flow Chart[edit]

Template:W1151-Exercises

W1152 While Loop[edit]

Template:W1152-Exercises

W1153 Repeat-While Loop[edit]

Template:W1153-Exercises

W1154 For Loop[edit]

Template:W1154-Exercises

W1165 Karel Introduction[edit]

Template:W1165-Exercises

W1171 Largest Number of Three[edit]

Template:W1171-Exercises

W1172 Greatest Common Divisor[edit]

Template:W1172-Exercises

W1173 Finding Primes[edit]

Template:W1173-Exercises

W1205 Function Introduction[edit]

Template:W1205-Exercises

W1292 Useful Randomness[edit]

Template:W1292-Exercises

W1301 Arrays[edit]

Template:W1301-Exercises

W1161 Basic Input[edit]

ExercisesExercisesIcon.png
  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]

Template:W1351-Exercises

W1352 Bubble Sort[edit]

Template:W1352-Exercises

W1501 Introduction to Objects[edit]

Template:W1501-Exercises

W1502 Object Attributes[edit]

Template:W1502-Exercises

W1503 Lines and Ellipses[edit]

Template:W1503-Exercises

W1504 First Steps on a Path[edit]

Template:W1504-Exercises

W1505 Images[edit]

Template:W1505-Exercises

W1511 Walking Turtles[edit]

ExercisesExercisesIcon.png
  •  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]

ExercisesExercisesIcon.png
  •  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]

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

W1521 Moving Along[edit]

ExercisesExercisesIcon.png
  • 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]

ExercisesExercisesIcon.png
  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]

ExercisesExercisesIcon.png
  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]

ExercisesExercisesIcon.png
  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]

ExercisesExercisesIcon.png
  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]

ExercisesExercisesIcon.png
  • 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

ExercisesExercisesIcon.png
  • 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.