• Study Guides
  • Homework Questions

Unit 2 Lab Assignment answers

  • Health Science

Lab 1: Games

Developers, see Unit 2 Lab 1 Pages 1-2 tips and videos on Piazza .

Lab pages have been renumbered (pg 1 split into two and page 4 dropped). Need to adjust TG. --MF, 3/21/19

Students build a number-guessing game in which the player tries to guess the computer's secret number, and the computer responds with as human-like dialog as the programmer can build. abstraction to serve the goals or writing clear, debuggable, improvable code—essential for developing complex programs.--> Students gain more experience with conditionals and predicates, preparing them to refine and deepen their understanding in lab 3.

This game comes back more than once in later units, because it's the canonical example of a binary search strategy. If you notice that some students always guess 5 first, while other kids start with 1 or 10, and if there's time at the end of the week, consider a class discussion of strategies.

script variables (a)

Students take time to debug each portion of their project. They get suggestions for features to add but are on their own to think about how to structure these extensions and modifications so that the code works and remains clear.

  • 10–20 minutes (<1 class period) on Starting a Number Guessing Game
  • 15–30 minutes (<1 class period) on Checking the Player's Guess
  • 15–30 minutes (<1 class period) on Debugging and Extending Your Number Guessing Game
  • 15–30 minutes (<1 class period) on Keeping Score with Global Variables
  • 20–40 minutes (<1 class period) on Choosing a Costume
  • Create a script variable to store temporary data.
  • Understand that programmers can assign values to variables, more than once to the same variable, unlike students' previous experience with variables in algebra.
  • There is an introductory offline activity suggested for this page included in the Engaging Students in Building Algorithms Offline section of the introduction to this Teacher Guide.
  • Use the repeat until conditional to control program flow.
  • Use the ask and answer blocks to manage text input.
  • Analyze and debug existing code.
  • Implement additional conditions using predicates.
  • The bug in the Number guessing game block is in the predicate of the repeat until , that is, in answer = secret number . If the same number is randomly chosen twice in a row, the player's last guess will be saved in answer , and therefore without asking the player to guess, the program will match the secret number and the player will be congratulated. A good strategy to avoid this is to save answer to a variable and make sure to clear that variable's value every time the game starts again or to reset it to something that is definitely not the right answer (such as a word or a negative number).
  • Debugging is a skill to refine over time. To support its development, analyze and debug projects together as a class. You may also have students share bugs they have encountered either to solicit suggestions from the class or to share a successful debugging approach. Make "Cherish your bugs" a classroom slogan. If students keep journals, ask them to record every bug: the symptom, the error in the code, how they found the error, and how they fixed it.
  • Create and use a global variable to keep track of a game score.
  • Use conditionals to end the game when the player reaches a target score.
  • Use stop blocks to manage program flow.
  • Note that this page is about the Click Alonzo game from U1L1, not about the number guessing game!
  • The student page urges students to get in the habit of saving an old project under a new name before they change anything in the project.
  • Manipulate list items.
  • This page is only superficially about costumes. It's about assigning a list value to a variable, about selecting an item from a list, and about the syntax of dropping an expression over a menu-type input slot.

This was cut from the student pages. I agree that too-complicated stuff shouldn't be there, but I think it's ok to share with teachers. That being said, the manual has been updated, and these search terms no longer work, so I will cut this. --MF

  • There are, in fact, two different ways in Snap ! to avoid using a global variable for revisiting a value with the same script; look up "block variables" and "object oriented programming with lambda" in the Snap ! Reference Manual if you or your students want to know more. (But both of those techniques are a little too complicated for this introductory course.)

Correlation with 2020 AP CS Principles Framework  

Computational thinking practices: skills.

  • 2.B: Implement an algorithm in a program.
  • 3.A: Generalize data sources through variables.
  • 4.B: Determine the result of code segments.

Learning Objectives:

  • AAP-1.A: Represent a value with a variable. (3.A)
  • AAP-1.B: Determine the value of a variable as a result of an assignment. (4.B)
  • AAP-2.B: Represent a step-by-step algorithmic process using sequential code statements. (2.B)
  • Write expressions that use list indexing and list procedures. (2.B)
  • Evaluate expressions that use list indexing and list procedures. (4.B)
  • Write expressions to generate possible values. (2.B)

Essential Knowledge:

  • AAP-1.A.1: A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
  • AAP-1.B.1: The assignment operator allows a program to change the value represented by a variable.
  • AAP-1.B.2: The exam reference sheet provides the " ← " operator to use for assignment. For example, a ← expression evaluates expression and then assigns a copy of the result to the variable a .
  • AAP-1.B.3: The value stored in a variable will be the most recent value assigned. For example: a ← 1 b ← a a ← 2 display(b) still displays 1 .
  • AAP-1.C.3: An index is a common method for referencing the elements in a list or string using natural numbers.
  • AAP-1.D.8: The exam reference sheet describes a list structure whose index values are 1 through the number of elements in the list, inclusive. For all list operations, if a list index is less than 1 or greater than the length of the list, an error message is produced and the program will terminate.
  • AAP-2.E.1: A Boolean value is either true or false.
  • accessing an element by index: aList[i] accesses the element of aList at index i . The first element of aList is at index 1 and accessed using the notation aList[1] .
  • determining the length of a list: LENGTH(aList) evaluates to the number of elements currently in aList .
  • AAP-3.A.8: The exam reference sheet provides result ← procName(arg1, arg2, …) to assign to result the “value of the procedure” being returned by calling PROCEDURE procName(parameter1, parameter2, …) { <block of statements> RETURN(expression) }
  • AAP-3.A.9: The exam reference sheet provides procedure INPUT() , which accepts a value from the user and returns the input value.

IMAGES

  1. [Solved] Unit 2 Lab Assignment . M1217 1 x Do Homework

    unit 2 lab assignment

  2. SC144 Unit 2 Lab Assignment done.pdf

    unit 2 lab assignment

  3. Unit 2 Lab Assignment

    unit 2 lab assignment

  4. Unit2LabAssignment

    unit 2 lab assignment

  5. MT480 Corporate Finance Unit 2 Lab Assignment

    unit 2 lab assignment

  6. unit 2 lab assignment human anatmoy.rtf

    unit 2 lab assignment

VIDEO

  1. Robotics lab

  2. ASL 1b Unit 2 Lab

  3. Unit 2 Lab 3: Making Decisions, Page 1

  4. CIS11 Unit 2 Lab: Simple LC-3 program

  5. Robotics lab

  6. Simulation of Line Following Robot FSM

COMMENTS

  1. Unit 2 assignment 2

    SATABDI MORSED 25201308 UNIT 2 Assignment 2 STUDY OF COOLING CURVES: A cooling graphically shows the change in state of substances from liquid to solid. Aim: To find out the accuracy of the thermometers. To study the cooling curve of paraffin wax. To study the cooling curve of stearic acid and its rate of cooling.

  2. HI255

    UNIT 7 Medical Coding Assignment; Unit 9 Lab Assignment 2 MBC2; Hi255 unit 1 - coding; HI255 Unit 3 assignment Worksheet 2202B; Show 6 more documents Show all 14 documents... Other. Date Rating. year. Ratings. Medical Coding study material. 2 pages 2018/2019 100% (3) 2018/2019 100% (3) Save. study materials for medical coding .

  3. MT 217 : Intro to Finance

    MT217 Finance Review Homework: Unit 2 Lab Assignment Score: 4 of 4 pts 1 of 10 Problem 2.LO1.2 What do balance sheets do? (Select the best choice below.) O A. May not balance if the firm suffered a net loss. B. Show how the firm raised funds to purchase a. MT 217. Purdue Global University.

  4. Unit 2 Lab Assignment answers (docx)

    Health-science document from Wayne State University, 8 pages, Unit 2 Lab Assignment Answers: 16. Latoya Nexsen, a 61-year-old female with diabetes type 1, presents today with the complaint that her left lower leg is cold and she has a sore that won't heal. Dr. Benson notes gangrene in Latoya's left extremity and ad

  5. Unit 2 Lab 1 Teacher Guide

    Developers, see Unit 2 Lab 1 Pages 1-2 tips and videos on Piazza. Lab pages have been renumbered (pg 1 split into two and page 4 dropped). Need to adjust TG. ... AAP-1.B: Determine the value of a variable as a result of an assignment. (4.B) AAP-2.B: Represent a step-by-step algorithmic process using sequential code statements. (2.B) AAP-2.N ...

  6. 4.1 Unit 2 Lab Assignment

    4.1 Unit 2 Lab Assignment. In this assignment you will use a loop and a custom method (called a "function"), as well as built-in Java classes. Create a Java program that meets the following requirements: Ask the user for input using the following prompt (precisely): "Please enter a number between 15 and 45. Enter 1 to exit."

  7. Solved AC114 Unit 2 Lab Assignment Question 6 of 6 Current

    AC114 Unit 2 Lab Assignment Question 6 of 6 Current At in Progress On Are Le Marted at Designs Co, a company that provides craft $11.000 Service Re $6.400 3.200 600 1.000 1,400 Sop Forment 10.000 Cal Expene 180 1100 Ex 130 1.300 Heade no add investert in June ut withdrew $1.200 in cash for personal use during the meth k $123cash in the bens foting are the mand company at 101 Ceda Helen made no ...

  8. Question: working with tabs, tables, and smart art graphics unit 2 lab

    Question: working with tabs, tables, and smart art graphics unit 2 lab assignment. working with tabs, tables, and smart art graphics unit 2 lab assignment . Here's the best way to solve it. Who are the experts? Experts have been vetted by Chegg as specialists in this subject.

  9. IT286 ChristopherMeyer Unit 2 Lab.docx

    2 Unit 2 Lab Assignment Unit 2 Lab Assignment Part 1 Complete the following in LabSim and submit the required screenshots, along with Part 2, to this unit's lab Dropbox. Take a screenshot of each Exam Review and then copy and paste all the screenshots into the same document you use for Part 2.

  10. Unit 2 Lab Assignment.docx

    Unit 2 Lab: Integumentary System Assignment Illustrate: Integumentary System lab Estimated time to complete: 2 hours Cell 1. Labeled image: (Image courtesy of Visible Body) 2. Description of Function: a. Cytosol: This cell is lined by a double-layered cell membrane. This membrane not only separates the inner cell content from outside, but also allows transportation of substances between the ...

  11. Justice AvantNoble SCI203_Unit_2_Lab_Report_Template

    Name: Justice Avant-Noble Date: 07-08-2023 Instructor's Name: Leah Willis Assignment: SCI203 Groundwater Sustainability Lab Title: The Effect of Human Development on Groundwater Sustainability Instructions: In Part I of this form, record the data from the Unit 2 Lab: Groundwater Sustainability. In Part II, follow the steps of the scientific method listed below to complete this lab report form.

  12. Solved Unit 1 Activity 2 Lab Assignment Name: Document your

    Accounting questions and answers. Unit 1 Activity 2 Lab Assignment Name: Document your problem-solving process so that someone reading your solutions will understand what you all and why you did it. Include label, descriptions, or units with your numbers. 1. In the US, the standard "Letter size sheet of paper measures 8 x 11 inches.

  13. Unit 2 Lab assignment.docx

    View Unit 2 Lab assignment.docx from ACCT 5301 at Columbia Southern University. Instructions Complete the assigned problems in the WileyPLUS Unit II Lab Assignment. You will find 10 questions.

  14. Skeletal System Unit 2 Exam Lab Flashcards

    Osteocytes. spongy bone, bone cells in small pockets. Lacunae. spongy bone, small pockets where osteocytes sit. Marrow. spongy bone, soft tissue found in the medullary cavity of long bones, there are 2 types of marrow, yellow and red. Study with Quizlet and memorize flashcards containing terms like Diaphysis, Epiphyses, Epiphyseal line and more.

  15. Solved Unit 1 Activity 2 Lab Assignment Name: 1. In 1985 the

    Unit 1 Activity 2 Lab Assignment Name: 1. In 1985 the United States consumed 12.28 cuadrition BTU in coal. Our consumption had risen to 19.40 quadrillion BTU by 1994. One BTU (British thermal unit) is the amount of energy required to raise the temperature of one pound of water one degree Fahrenheit at or near 39.2 degrees Fahrenheit. One ...

  16. Biomechanic Tendo Lab Assignment .docx

    1 Tendo Unit Lab Assignment Justin T. Bates Department of Health Sciences, Liberty University EXSC 351: Biomechanics Lab (004) Professor Allison Schaefer February 10, 2022 2 Tendo Unit Lab Data Collection Sheet Subject name: Justin Bates Exercise Perform

  17. EET221L Unit 2 Lab Assignment 2 Steven Rowe.docx

    1 EET221L AO Instrumentation and Measurement LAB Unit 2 Lab Assignment 2 By: Steven Rowe Online EET Department ECPI University Date: 10/12/2018 ECPI's Honor Pledge: I pledge to support the Honor System of ECPI. I will refrain from any form of academic dishonesty or deception, such as cheating or plagiarism. I am aware that as a member of the academic community it is my responsibility to turn ...

  18. A&P2 Lab Quiz 2 (blood vessels) Flashcards

    Terms in this set (17) the inner most membranous layer of an artery or vein that is comprised of simple squamous endothelium; it comes in direct contact with blood in the lumen. - supported by the internal elastic membrane. - in vessels larger than 1 mm in diameter, a subendothelial layer, consisting of a basement membrane and loose CT ...

  19. Lab2

    Unit 2 Lab Assignment: Analyzing Research. Thinh Tran Hiep Le Valencia College PSY 2012 Dr. Melonie Sexton March 5, 2021. What is the title of the study? Who conducted the research? The title of the study is Conditioned Salivation and Associated Dreams from REM sleep by Russel Conduit and Grahame Coleman. Describe the study in a few sentences ...

  20. GB 519 :

    Case Study of Boston Beer Company Carlos A. Simons Jr. Purdue University Global GB519 UNIT 3 ASSIGNMENT 2 Abstract This case study will look at the extensive history, organizational setup, and strategic ambitions of Boston Beer Company. ... GB519 Unit 2 Lab.xlsx. Units 420 Units started in production % Complete 60% A1 Produciton data ...

  21. Solved BIOL 208 UNIT 2 Post-lab Assignment AXIAL NAME:

    BIOL 208 UNIT 2 Post-lab Assignment AXIAL NAME: (bone) 1 12 (bone) 13 (bone) 14 Ethmoid bone (bone) (bone) 15 4 (bone) 5 16 (bone) (bone) 17 (bone) 18 9 10 (bone) 19 11 20 BIOL 208 UNIT 2 Post-lab Assignment AXIAL NAME: (bone) (bone) 2 (bone) 8 (bone) 3 - (bone) Mandibular fossa (bone) 4 10 Mastoid process 11 (bone) Terms: Foramen magnum Incisive foramen Occipital condyle Palatine bone ...

  22. Williams Unit2Final

    Lab Assignment name: mike williams course section number: 12g fall co unit biologically important molecules final report please extract the final report and. ... Unit 2 - Biologically Important Molecules. Please attach a photograph of Experiment 2 in progress in the space below. (Be sure that you include a paper with your name, course number ...