You are on page 1of 6

Algorithm

Defne: An algorithm is a well-ordered collection of unambiguous and effectively computable operations that when
executed produces a result and halts in a finite amount of time [Schneider and Gersting 1995].

Do you do different things based on conditions? How might you use the words “if” or “otherwise” in
your instructions? (For example: if the water is the correct temperature rinse mouth, otherwise adjust
temperature.)

Use the word “repeat” in your instructions. For example: Move the brush up and down on tooth.
Repeat 5 times.

Hint: You must break the problem into chunks. Order the chunks and then describe in detail what
happens in each chunk.

Note we are starting with step #0. In programming, we often like to count starting from 0 so it is good
for us to get used to this idea.

How to brush your teeth by: Kunj patel

Chunk 0. Entering

Step 0: Enter the bathroom of the house you are in.

Step 1: Stand in front of the sink and the bathroom mirror

Chunk 1. the toothbrush being prepared without toothpaste.

Step 0: Turn on the tap by 20%

Step 1: Using your dominant hand, pick up your toothbrush that you use every day.

Step 2: Lightly bring the toothbrush below the tap water in front of you.

Step 3: For 10 seconds, move the toothbrush backwards and forwards slightly to moisten the
toothbrush.

Step 4: Turn off the tap water entirely.

Step 5: Bring the toothbrush toward your chest.

Chunk 2. Adding toothpaste to the toothbrush.

Step 0: Pick up the toothpaste you use daily from the bathroom with your non-dominant
hand while holding your toothbrush in your dominant hand.

Step 1: Holding the toothbrush with the other three fingers of your dominant, remove the lid
from the toothpaste using your thumb and forefinger.

Step 2: Put the lid on the right side of the sink.

Step 3: Make the toothbrush face the sky.


Step 4: Fill 90% of the toothbrush with toothpaste after adding it.

Step 5: Holding the toothbrush and toothpaste in your non-dominant hand, lift the lid from the
right side of the sink with your dominant hand.

Step 6: With your dominant hand, Put the lid on the toothpaste.

Step 7: Return the toothpaste to where you found it from.

Step 8: Switch the toothbrush between your non-dominant into your dominant hand.

Chunk 3. Getting ready to brush

Step 0: Turn on the tap by 5% with your non-dominant hand.

Step 1: Repeat chunk 1 Steps 2 to 5.

Step 2: Move the toothbrush towards your teeth.

Step 3: While the upper and lower teeth are still joined, open your mouth.

Step 4: Tilt your right hand to the right by 90 degrees.

Step 5: keep Facing the toothbrush in the direction of your teeth.

Chunk 4. Brushing the top right of your teeth

Step 0: Start moving the brush on the center of your teeth 5 times in a clockwise motion

Step 1: Move your brush clockwise to the top right of your outer surface teeth and move the
brush 5 times in a small clockwise motion.

Step 2: Open your upper and lower teeth

Step 3: Move your brush clockwise to the top right of your biting surface teeth and move the
brush 5 times in a small clockwise motion.

Step 4: Move your brush clockwise to the top right of your inner surface teeth and move the
brush 5 times in a small clockwise motion.

Chunk 5. Brushing the Botton right of your teeth

Step 0: Move your brush to the bottom right of your outer surface.

Step 1: Close your upper and lower teeth and make them joined

Step 2: Move the brush 5 times in a small clockwise motion.

Step 3: Open your upper and lower teeth

Step 4: Move your brush clockwise to the bottom right of your biting surface teeth and move
the brush 5 times in a small clockwise motion.

Step 5: Move your brush clockwise to the bottom right of your inner surface teeth and move the
brush 5 times in a small clockwise motion.
Chunk 6. Brushing the top center of your teeth

Step 0: Move your brush to the top center of your outer surface.

Step 1: Close your upper and lower teeth and make them joined

Step 2: Move the brush 5 times in a small clockwise motion.

Step 3: Open your upper and lower teeth

Step 4: Move your brush clockwise to the top center of your biting surface teeth and move
the brush 5 times in a small clockwise motion.

Step 5: Move your brush clockwise to the top center of your inner surface teeth and move the
brush 5 times in a small clockwise motion.

Chunk 7. Brushing the bottom center of your teeth

Step 0: Move your brush to the bottom center of your outer surface.

Step 1: Close your upper and lower teeth and make them joined

Step 2: Move the brush 5 times in a small clockwise motion.

Step 3: Open your upper and lower teeth

Step 4: Move your brush clockwise to the bottom center of your biting surface teeth and move
the brush 5 times in a small clockwise motion.

Step 5: Move your brush clockwise to the bottom center of your inner surface teeth and move
the brush 5 times in a small clockwise motion.

Chunk 8. Brushing the top left of your teeth

Step 0: Move your brush to the top center of your outer surface.

Step 1: Close your upper and lower teeth and make them joined

Step 2: Rotate your hand 180 degrees to the left.

Step 3: Move your brush clockwise to the top left of your outer surface teeth and move the
brush 5 times in a small clockwise motion.

Step 4: Open your upper and lower teeth

Step 5: Move your brush clockwise to the top left of your biting surface teeth and move the
brush 5 times in a small clockwise motion.

Step 6: Move your brush clockwise to the top left of your inner surface teeth and move the
brush 5 times in a small clockwise motion.

Chunk 9. Brushing the bottom left of your teeth

Step 0: Move your brush to the bottom left of your outer surface.
Step 1: Close your upper and lower teeth and make them joined

Step 2: Move the brush 5 times in a small clockwise motion.

Step 3: Open your upper and lower teeth

Step 4: Move your brush clockwise to the bottom left of your biting surface teeth and move
the brush 5 times in a small clockwise motion.

Step 5: Move your brush clockwise to the bottom left of your inner surface teeth and move
the brush 5 times in a small clockwise motion.

Step 6: Repeat chunks 5 to 8 again.

Chunk 10. Cleaning the teeth brush

Step 0: Get the toothbrush out of your teeth and make it face the sky.

Step 1: Bring the toothbrush under the tap water.

Step 2: Turn on the tap water by 90%.

Step 3: For 10 seconds, move the toothbrush backwards and forwards to wash it.

Step 4: Turn off the tap water entirely.

Step 5: For 5 seconds, shake the toothbrush in an upward-backward motion to remove any
remaining water.

Step 6: Return the toothbrush to its original location.

Chunk 11. Cleaning hands and mouth.

Step 0: Put your hands under the tap water with the water turned on to 30%.

Step 1: Lift your right hand, and on your lips, make three quick forward-backward motions.

Step 2: bring your right hand back under the tap water.

Step 3: For 10 seconds, move the right hand in a forward-backward motion while moving the
left hand in a backward-forward motion.

Step 4: Turn off the tap water entirely.

Step 5: shake your hands to get rid of the water.

Step 6: dry your hands with a towel.

CS20-CP1

Apply various problem-solving strategies to solve programming problems throughout Computer Science 20.

a) Explore the computational thinking concepts of decomposition, pattern recognition, abstraction and algorithm design.

d) Design algorithms that allow computers and humans to solve problems effectively.
CS30-CP2

Engage in collaborative programming practices.

(c Collaborate with others to plan a solution to a problem.


)
Criteria Rating
Functionality 6.0 The large 5.0 The large 4.0 The large 3.0 The large
problem has been problem has been problem has been problem has been
broken into broken into broken into broken into
manageable manageable manageable manageable
chunks and chunks and good chunks and good chunks and some
exceptional detail detail has been detail has been detail has been
has been used to used to carry out used to carry out used to carry out
carry out each each chunk most chunks some chunks
chunk
Logic 2.0 The chunks 1.0 The logic
have been would be
ordered in a improved with
logical flow and better
the detail also organization and
follows a proper order of the
order chunks and detail.
Communication 1.0 The
communication is
clear and precise
(unambiguous)
Completes Task 1.0 The algorithm
would effectively
carry out the task
and halts in a
finite amount of
time

You might also like