Learning coding is easy. This text gives you tools to help you in your quest to code. Setting the path leads to success. Each chapter opens with a pretest to show you what you already know and concludes with a posttest to show you what you learned. The Essential Question at the beginning of each chapter will engage you to uncover the important points presented in the content. Assess what you learned. Multiple opportunities are provided to confirm learning as you explore the content. Formative assessment includes:cn The chapter test allows you to evaluate your understanding of the chapter material. Application and Extension of Knowledge activities challenge you to relate what you learned in the chapter to your own ideas and projects. Online Activities allow you to practice the key terms presented in each chapter. Unlock the Code Game Design D es es s ig ig ig ig n n n Chapter Preview Section 11.1 Introduction to Gamee Desig De g gn Section 11.2 Finalizing the Game Build Bu d Learning Goals 11.1 Describe the elements of a succccesssfuull gam a m me. 11.2 Explain ways in which to provid de g gam m me balancing. Terms asset avatar boss character game balancing game loop game mechanics game-design document genre non-player character (NPC) objective player character (PC) replayability College and Career Readiness Reading Prep. Take the time to reread sections of this chapter that raise questions or cause confusion. Rereading can clarify the content and strengthen your understanding of the material. Chapter 11 250 Check Your Computer Science IQ Before you begin this chapter, see what you already know about computer science by taking the chapter pretest. The pretest is available at www.g-wlearning.com. Video games are a multibillion-dollar-a-year industry. Coding is a big part of video game design, but there are many more aspects. Overall game design is critical to the success of the industry. There are many career opportunities. Game developers, accountants, teachers, and more are employed in the industry. These people draw from a wide variety of skill sets. Scratch supports all that is required to produce a video game. The preceding chapters cover all of the basic coding needed. All that remains is to have knowledge of game design. To make a good video game, one needs to understand what makes a good game. It is a formula! From the story, to the objective, rules, and scoring, everything must fit together. Why should video games be considered valid educational tools? 251 Get ready for life as a coder. You will need good reading, writing, speaking, and listening skills as you become a coder. A personal portfolio shows off your best work when exploring volunteer, education and training, and career opportunities. Each chapter opens with a Reading Prep activity and ends with Communication Skills applications to improve your literacy skills. Portfolio Development activities guide you through creating a collection of your best work to use when applying for college or a job. Review and Assessment Chapter 7 Test Multiple Choice question. 1. What is the scope of a custom block? A. global B. local to the script C. either global or local D. local to the sprite 2. Which of the following descriinibes referencing a custom block a script? A. Call B. Insert C. Spent D. Blocked 3. The Scratch operator that rem the decimal portion of a num without rounding is: A. sqrt B. floor C. mod D. ceiling 4. What concept in computer sc do custom blocks serve? A. expressions B. variables C. reusability D. strings 5. Which of the following can bee as input for a custom block? A. round, floor, ceiling B. variable, expression, valuee C. block, define, script D. sound, costume, backdropp Completion Complete the following sentences with the correct word(s). 6. Making a custom block is a two-ck Matching Copyright Goodheart-Willcox Co., Inc. p as y i r in t rem moves number puter science ve? wing can be used m bl ock? iling ession, value script me, backdrop Compl Complete the following sentences w the correct word (s). 6. Maki ng a custom bloc k is a two- step pro cess of creating the blo and then ______ it with _ _ the code snippet. 7. Benefits of using custom blocksto include making the code easy read, creating small sections of code, and allowing the c ode to be more easily ______. 8. ______ is a ma thematical operation that strips the result of any decimal remainder. 9. Usingnot custom blocks for code only reduces therepeatingfor chance ______, it is an efficient way to work. 10. The data types a custom block______. can accept are ______, ______, _ _ and Matching Match each term with its correct definition. A. call B. custom block C. utility D. argument E. scope 11. The range over which a block or variable can be used. 12. A container made by the coder that holds a snippet of code. 13. A p rogram that helps the user in some way. 14. A reference to a custom block. 15. Val ue passed to and used in the definiti on of a custom block. Chapter 7 Custom Blocks Custo m Block 169 Co., Inc. Application and Extension of Knowledge 1. Grace Hopper was a leader in the field of computing. Research the history of computing, and investigate other prominent women in the field. Select three, and write a one-paragraph description for each that outlines her contributions and when she was active in the field. 2. The United States uses the US Customary system of measurements. In this system, length is measured in inches, feet, and yards. However, most of the world uses the metric system. In this system, length is measured in millimeters, centimeters, and kilometers. Design and create a utility in Scratch that converts a length measurement from inches in the US Customary system to millimeters in the metric system or vice versa. Research the correct conversion formulas. Then, use custom blocks to streamline the code. 3. In Scratch, write a custom block that rounds any number to a given number of decimal places. Ask the user to enter the number of decimal places to which the number should be rounded. Use the algorithm of multiplying the number by a power of 10, applying the floor block, and then dividing the result by the same power of 10. Create a program that uses the custom block. Save the project as AEK07-03 in your working folder. 4. Design and create a Scratch project that asks the user for the lengths of three sides. Then, tell the user if the sides form a triangle and if the triangle is a right triangle. Use a custom block with the proper data type for the input. Save the project as AEK07-04 in your working folder. 5. Working with light microscopes involves estimating very small distances. Generally, the circular field of view is measured as a diameter given in micrometers. One micrometer (μm) is one one-thousandth of a millimeter. A compound microscope has two lenses, the ocular lens and the objective lens. Design and create a utility in Scratch that reports the field of view for a compound microscope based on us er-input values for magnification of the objective and ocular lenses. Define a custom block to calculate the total magnification (ocular lens × objective lens) based on user input. Assume the diameter of the field of view using a 4×objective lens with a 10×ocular lens is 4,400 μm. In the main program, multiply 4400 × 4 × 10 and divide it by the calculated total magnification to arrive at the new diameter of the field of view. Save the project as AEK07-05 in your working folder. Online Activities Complete the following activities, which will help you learn, practice, and expand your knowledge and skills. Vocabulary. Practice vocabulary for this chapter using the e-flash cards, matching activity, and vocabulary game until you are able to recognize their meanings. 170 Introduction to Computer Scien ce: Coding Copyright Goodheart-Willcox Co., Inc. ib n mb ci Communication Skills Reading. that you have completed reading multiple chapters in this analyze the themes and structures that the authors used. Create concept map that illustrates how the themes of this text are related.atext,Now Writing. Standard English means that word choice, sentence structure, paragraphs, and the format of communication follow standard conventions used by those who speak English. Well-written paragraphs are usually the product of editing. Write an informative report on common programming languages consisting of several paragraphs. Edit the writing for proper syntax, tense, and voice. Speaking. Select a member of your class to whom you will present the information you learned about common programming languages. Make use of any displays or demonstrations to enhance the presentation. Listening. Active listening is fully participating as you process what others are saying. Practice active listening skills while listening to a news report on the radio, television, or a podcast. Select a single story, and prepare a report in which you analyze these aspects of the story: the speaker’s audience, point of view, reasoning, stance, word choice, tone, points of emphasis, and organization. Portfolio Development File Structure. After you have chosen file formats for your documents, determine a strategy for storing and organizing the materials. The file structure for storing digital documents is similar to storing hardcopy documents. First, locate a place to store each item. Ask your instructor where to save your documents. This could be on the school’s network or a flash drive of your own. Next, decide how to organize related files into categories. For example, Certificates might be the name of a main folder with Community Service Certificates and School Certificates subfolders. Appropriate certificates would be saved in each subfolder. The names for folders and files should be descriptive, but not too long. 1. Decide on the file structure for your documents. 2. Create folders and subfolders on the school’s network drive or flash drive on which you will save your files. College and Career Readiness College and Career Readiness Chapter 7 Custom Blocks Custom Block 171 Copyright Goodheart-Willcox Co., Inc.
Previous Page Next Page