Computer expert badge pdf12/8/2023 ![]() It might take multiple tries to code the portrait correctly, so mistakes are to be expected. If the “computer” doesn’t follow the instructions correctly, that’s okay. ![]() If you don’t have a partner, that’s okay-just follow your own instructions, step by step, to see if you can recreate your portrait. Remember to be as specific as possible-once you hand over your algorithm, the “computer” won’t be able to ask questions, and you won’t be able to give any additional instructions!Īfter you’ve written an algorithm, share your pseudocode with someone else who can play the role of a computer, drawing your portrait by following the instructions. The “Portrait Function List” on the Code a Portrait handout has some examples of functions, or you can create your own (as long as they’re in the correct syntax!). Then, use functions to write pseudocode someone else could follow to draw a portrait of you or someone you admire. Is the size or placement of the shapes important?.What are the steps you would use to tell someone how to draw a smiley face?.What shapes do you need to make a smiley face?. ![]() Together, the functions should make up an algorithm that could tell someone how to draw a smiley face. Then, create a short program in pseudocode with three or more tasks (functions). Look at the examples that work as well as those that don’t! Make sure you understand what functions are and how to write them with the correct syntax. Note: If you don’t have a partner for the activity, that’s okay! You can test your own algorithm and create a portrait on your own.įirst, check out page 1 of the Code a Portrait handout. Then give the algorithm to someone else, who will use the coded algorithm to draw the portrait. It saves time and still lets a programmer check that their program will run.įor this activity, you’re the programmer! Use code to create an algorithm for a portrait of yourself or someone you admire. It’s used as a quick way of thinking about a program without completely writing it out in code. It’s not actual coding, but rather a written description of the key elements of an algorithm or program. Pseudocode is a way to plan a computer program using human-friendly language. When programmers start working on a new idea, they often sketch out their ideas on paper before they move on to coding their algorithms on a computer. Sequence is the order in which the computer performs the steps of the algorithm. ![]() It’s a type of instruction that’s similar to a verb: a function does something. For example, a step-by-step recipe or a set of directions from one place to another are two examples of algorithms you might already use! A function is one of the basic building blocks of a program. An algorithm is a series of specific instructions that can be applied to many situations. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |