Free Essay

Checkpoint Wk 4

In:

Submitted By rhalcomb7
Words 827
Pages 4
Worm

Declare, Inches, Lengthworm, DistanceRemaining As Real
Set Lengthworm = 1 Inch
DistanceRemaining = Inches
If DistanceRemaining <= Lengthworm
Then Enter
Otherwise
Repeat
Lengthworm = 1.5 * Lengthworm
Return to Lengthworm
Enter Apple
Eat Apple
End program

Main Module

Declare, Inches, Lengthworm, DistanceRemaining As Real
Call Welcome Message module
Call Input Data module
Call Calculations module
Write “Worm eats apple”
End

Process

Display program title
Display directions
Get worm length
Get distance from apple
Calculate distance (movement)
Output result

Input

Length of worm (from keyboard)
Distance from apple

Output

Worm length * 1.5 when Distance < Worm length
Write “Worm eats apple”
End

Start Main module
Declare Length,Distance as float
Display “Enter the length of the worm”
Input Length
Display “Enter the distance of worm from the apple”
Input Distance
Call MoveWorm Module
End main module

MoveWorm module
While Distance >= 0
Distance = Distance – WormLength
End While
Display “The worm has reached the apple!.”
End MoveWorm module

----

It's OK if you don't have much to go on, that's what classes are for.

I believe you have not written programs before, so writing in pseudocode is perfect.

IBM used to recruit people who were asked to do similar problems for a qualifying test.

To help you understand how this works, I suggest you put yourself in the worms shoes, and make yourself a table with three columns.

The first column is "step", i.e. number of times you, the worm, have inched towards the apple.

The second column is the distance from the apple in worm units.

The third column is the question: am I there yet?

On the first row, write 1 in column 1, 5 worm units in column 2, and say no in column three.

Now proceed to complete the second, third, ... until you get to the apple.

Get the idea? Need more details? Don't hesitate to post. | * * programming - Eden, Thursday, October 15, 2009 at 4:30pm would that be process then input then output I for one have never done this before and its been hard trying to put it together i have read and read examples but its not clicking in my head for some reason not sure why?? | * * programming - MathMate, Thursday, October 15, 2009 at 4:42pm Input and output in your example are trivial, and consists of entering the initial distance from the apple, and when the worm got hold of the apple, it would say "Yum, yum!" or something like that.

It's the processing that takes a little more thinking.

The concept that is being introduced in this exercise is looping, or decision making, i.e. when to stop.

If you had completed the table I suggested, you would have gone through the complete step of processing and simple decision making. Don't forget to reduce the distance after every step. | * * programming - Eden , Friday, October 16, 2009 at 4:13pm Okay i did the input output now i have to do design which is Main Module puEnd Main Module, Input Data Module,End input data Module, perform Caclulations Module, Output results Module, And End Output Results Module... Please if you can help me Thanks |
-------------------------------------------------

Maybe if the distace from the apple is D and the length of the worm is W, there is a loop that calculates D = D-W on each cycle.
-------------------------------------------------
while distance>= worm length distance = distance - worm length

Where distance is the distance remaining to the apple.
Start by breaking your problem down into smaller problems, eg, write down with pencil and paper "Move worm:" position = position + 1

etc

Then translate it into the language you are using.

-------------------------------------------------
Main
Declare Length as real
Declare Distance as real
Call Get Length
Call Get Distance
Call Move Worm
End
Get Length
Write “Enter the length of the worm"
Write Get Length
End Get Length
Get Distance
Write "Enter the distance to get to apple"
Get Distance
Get Distance
Move Worm
While Distance > 0
Distance = Distance - Length
End While
Write “Worm has reached the apple."
End Move Worm
A worm is moving toward an apple. Each time it moves, the worm cuts the distance between itself and the apple by its own body length until the worm is close enough to enter the apple. The worm can enter A worm is moving toward an apple. Each time it moves, the worm cuts the distance between itself and the apple by its own body length until the worm is close enough to enter the apple. The worm can enter the apple when it is within a body length of the apple. The apple when it is within a body length of the apple. A worm is moving toward an apple. Each time it moves, the worm cuts the distance between itself and the apple by its own body length until the worm is close enough to enter the apple. The worm can enter the apple when it is within a body length of the apple.

Similar Documents

Premium Essay

Wk 4 Checkpoint

...Read “Monitoring Employees on Networks: Unethical or Good Business?” on p. 210 (Ch. 6) of Essentials of Management Information Systems. Answer the following questions in 200 to 300 words: How does e-mail benefit an organization? Why might an organization want to limit how an employee uses e-mail during work hours? What is an e-mail’s path once it leaves an organization? Email benefits an organization in speed of communication between its employees as well as management and also the decreased cost of this method of instant communication. An organization would limit how an employee uses email due to several concerns including personal related emails containing personal or offensive language or material that would be directly linked with the organization that could result in negative publicity and lawsuits. Also, the risk of sensitive organization information, client information or trade secrets being leaked is a constant concern of organization management. The path of an email is meant to go directly from the sender to the receiver but can be sent over the internet to other sources and obtained by hackers and unintended individuals either intentionally or by unintentional means so using private networks are a widely used method to avoid this from happening as much as possible. What is the effect of instant messaging on organizational networks? What are benefits and drawbacks of using instant messaging in an organization? The effect can be both beneficial as well as hurtful...

Words: 651 - Pages: 3

Premium Essay

Wk 4 Checkpoint Sci 275

...Checkpoint: Population Size There are four factors which create changes in population sizes on a global scale; the birth rate, the death rate, migration, changes in environment. Any changes which create a global scare normally pertain to birth and death rates throughout the world. The factors which can affect the birth rate scale are family planning (including contraception), education, as well as religious and cultural views interfering with the amount of births a single family is allowed to have (such as China). The factors which can affect the death rate are a lack of education (inability to adapt and survive), diseases (with lack of medical care), and crime (murder, suicide, and accidents). Migration can be due to many different reasons ranging from unstable environments politically, economically, or within the environment in general. And each of those factors can have factors of their own, whether it’s a personal at home situation or a more wide spread situation with the surrounding area. Typically birth rates rise faster than death rates. Honestly this can be attributed to modern science, our innate ability to adapt to changing environmental situations, and that we are typically living longer than our ancestors have. However, when pertaining to the nutria, their population increases dramatically because their birth rate sky rockets compared to their death rate. According to the video, they are extremely over populated. The nutria’s increasing population can be...

Words: 473 - Pages: 2

Free Essay

Wk 4 Short Case Mangement Checkpoint

...In today's market many younger people are brought into a company in a supervision role and will be responsible for supervising older employees. In the short case in the reading material this week, the supervisor is 20 years younger than the employees she will be in charge of. The supervisor has been very supportive and has gone out of her way to praise the employee's and his or her work. Whenever a disagreement arises the older employees run to the head boss. The supervisor has asked them numerous times to come to her when they have problem. Placing myself in this position the first thing I would do is to request a meeting with my boss to discuss the situation. I would let him know of my concerns and the issues taking place with the older employees. After meeting with my boss I would request the older employees join in the meeting and explain the chain of command in trying to resolve future problems. By having my supervisor in the meeting, the employees would understand that any issues or problems must come through me before going forward and only if we cannot resolve the problem. My supervisor could then emphasis that he is supporting me and will continue to do so until he has a reason not to trust my judgment. I would then explain to the employees that I will continue to have an open door policy and will listen with an open mind to all problems and issues and will do whatever needs to be done to resolve any issues. Because of their years of experience, I can learn from...

Words: 306 - Pages: 2

Free Essay

Checkpoint 8: Issues in Policing Response

...Wk. 8 Checkpoint: Issues in Policing Response 1. CJS/210: Fundamentals of Policing Dec. 9th, 2011 What are the issues facing law enforcement today? How do these issues coincide with those of the Department of Homeland Security (DHS)? How can the relationship between local, state and federal law enforcement agencies and DHS improve? Major incidents of police brutality and corruption amongst law enforcement agencies in the recent 20 + years has made the public realize that police corruption has occurred for many years under their noses, making them feel vulnerable and angry. Example# 1: Police brutality case of Rodney King in 1991, where several police officers brutally beat a black man for a traffic violation. The event happened to get videotaped by a complete stranger, George Holiday, which became a media black eye to police agencies, but that tape became a crucial piece of evidence that led to a chain of events that included two trials and a major riot in 1992. http://prop1.org/legal/prisons/kinga2.htm Example#2- The political downfall of Detroit’s former Mayor Kwame Kilpatrick starting in March 24, 2008, Kilpatrick was charged with eight felony counts, including perjury, misconduct in office, and obstruction of justice. On September 4, 2008, Kilpatrick announced his resignation as mayor and soon after went to jail. http://www.freep.com/article/99999999/NEWS01/80124052/Kwame-Kilpatrick-mayor-crisis 2. Then policing agency such as the FBI...

Words: 456 - Pages: 2

Premium Essay

Gm533Week3 Checkpoint

...wk 3 checkpoint Grading Summary These are the automatically computed results of your exam. Grades for essay questions, and comments from your instructor, are in the "Details" section below. Date Taken: 11/13/2011 Time Spent: 10 min , 42 secs Points Received: 35 / 35 (100%) Question Type: # Of Questions: # Correct: Multiple Choice 8 8 Grade Details 1. Question : The population of lengths of aluminum-coated steel sheets is normally distributed with a mean of 30.05 inches and a standard deviation of 0.2 inches. What is the probability that a sheet selected at random will be less than 29.75 inches long? Student Answer: .8944 .1056 .9332 .0668 Comments: 2. Question : The population of lengths of aluminum-coated steel sheets is normally distributed with a mean of 30.05 inches and a standard deviation of 0.2 inches. What is the probability that a sheet selected at random from the population is between 29.75 and 30.5 inches long? Student Answer: .4332 .4878 .0546 .9210 Comments: 3. Question : During the past six months, 73.2% of US households purchased sugar. Assume that these expenditures are approximately normally distributed with a mean of $8.22 and a standard deviation of $1.10. Find the probability that a household spent less than $5.00. Student Answer: .9983 0.000 1.00 0.0017...

Words: 586 - Pages: 3

Premium Essay

Paper002

...Bookkeeper Course; Discipline: Accounting (ACC); Units (Credits): 6; Schedule ... ACC 290www.scribd.com/collections/3473096/ACC-290Cached You +1'd this publicly. Undo ACC/290 checkpoint acc/290 assignment acc/290 discussion questions acc/290 dqs acc/290 week acc/290 appendix acc/290 final acc/290 learning acc/290 ... ACC 290 Final Examwww.scribd.com/doc/89721525/ACC-290-Final-ExamCached You +1'd this publicly. Undo Apr 17, 2012 – purchase the solution to final Exam http://studentoffortune.com/question/1468561 /ACC-290-Wk-5 1) Which financial statement is used to ... ACC 290 - Student of Fortunestudentoffortune.com/question/1336889/ACC-290Cached You +1'd this publicly. Undo Jan 18, 2012 – ACC 290 Week 4 Learning Team Financial Reporting Kroger ... ACC 290 Week 4 - Chapter 4 P-4.8A Pro window washing.xlsx (33K) ACC 290 ... ACC 290 Week 3 Individual Summary Question One ...studentoffortune.com/.../ACC-290-Week-3-Individual-Summary-Qu...Cached You +1'd this publicly. Undo ACC 290 Principle Of Accounting I - Entire Class - Latest Exercises Upto May 2012. This tutorial ... ACC 290 Week 2 Individual Problems and Exercises.doc ... acc 290 - Student of Fortunestudentoffortune.com/question/1337562/Cached You +1'd this publicly. Undo ACC 290 Week 4 Individual Assignment Week Four Problem ... ACC 290 Week 4 Learning Team Financial Reporting Problem, Part 1.doc (34K) (Preview) ... ACC 290 - Student of...

Words: 560 - Pages: 3

Premium Essay

Image Theory

...Andrew R. Cohen1, Christopher Bjornsson1, Ying Chen1, Gary Banker2, Ena Ladi3, Ellen Robey3, Sally Temple4, and Badrinath Roysam1 1 Rensselaer Polytechnic Institute, Troy, NY 12180, USA, 2 Oregon Health & Science University, 3181 SW Sam Jackson Park Road, L606, Portland, OR 97239, USA 3 University of California, Berkeley, Berkeley, CA 94720, USA 4 Center for Neuropharmacology & Neuroscience, Albany Medical College, Albany, NY 12208, USA ABSTRACT An algorithmic information theoretic method is presented for object-level summarization of meaningful changes in image sequences. Object extraction and tracking data are represented as an attributed tracking graph (ATG), whose connected subgraphs are compared using an adaptive information distance measure, aided by a closed-form multi-dimensional quantization. The summary is the clustering result and feature subset that maximize the gap statistic. The notion of meaningful summarization is captured by using the gap statistic to estimate the randomness deficiency from algorithmic statistics. When applied to movies of cultured neural progenitor cells, it correctly distinguished neurons from progenitors without requiring the use of a fixative stain. When analyzing intra-cellular molecular transport in cultured neurons undergoing axon specification, it automatically confirmed the role of kinesins in axon specification. Finally, it was able to differentiate wild type from genetically modified thymocyte cells. Index Terms: Algorithmic information...

Words: 3769 - Pages: 16

Free Essay

Intro Bio

...Lab Manual Introductory Biology (Version 1.4) © 2013 eScience Labs, LLC All rights reserved www.esciencelabs.com • 888.375.5487 2 Table of Contents: Introduc on: Lab 1: Lab 2: Lab 3: Lab 4: The Scien fic Method Wri ng a Lab Report Data Measurement Introduc on to the Microscope Biological Processes: Lab 5: Lab 6: Lab 7: Lab 8: Lab 9: The Chemistry of Life Diffusion Osmosis Respira on Enzymes The Cell: Lab 10: Lab 11: Lab 12: Lab 13: Lab 14: Lab 15: Cell Structure & Func on Mitosis Meiosis DNA & RNA Mendelian Gene cs Popula on Gene cs 3 4 Lab Safety Always follow the instruc ons in your laboratory manual and these general rules: eScience Labs, LLC. designs every kit with safety as our top priority. Nonetheless, these are science kits and contain items which must be handled with care. Safety in the laboratory always comes first! Lab Prepara on • • Please thoroughly read the lab exercise before star ng! If you have any doubt as to what you are supposed to be doing and how to do it safely, please STOP and then: Double-check the manual instruc ons. Check www.esciencelabs.com for updates and ps. Contact us for technical support by phone at 1-888-ESL-Kits (1-888-375-5487) or by email at Help@esciencelabs.com. • Read and understand all labels on chemicals. If you have any ques ons or concerns, refer to the Material Safely Data Sheets (MSDS) available at www.esciencelabs.com. The MSDS lists the dangers, storage requirements, exposure treatment...

Words: 26048 - Pages: 105

Premium Essay

Rymco Blue Ocean Strategy

...PROJECT MANAGEMENT By Michael Harding Roberts Table of Contents Chapter 1 - Introduction and Principles .............................................................................. 1 Chapter 2 - Projects and Stages ........................................................................................ 4 Chapter 3 - Roles and Responsibilities ............................................................................ 27 Chapter 4 - Project Definition ........................................................................................... 45 Chapter 5 - Risk Management ......................................................................................... 57 Chapter 6 - Estimating ..................................................................................................... 66 Chapter 7 - Planning ........................................................................................................ 79 Chapter 8 - Stage Agreement ........................................................................................ 101 Chapter 9 - Project Support ........................................................................................... 110 Chapter 10 - Tracking, Controlling and Reporting .......................................................... 122 Chapter 11 - Change and Issue Management ............................................................... 144 Chapter 12 - Quality Management ......................................................................

Words: 93619 - Pages: 375

Premium Essay

Management in Organization

...environment. Topics • Introduction to Management and Organisational Behaviour • Individual and Group Behaviour in Organisations • Decision- making and Communications in Organisations • Leadership, Organisational Structure & Environment • Power and Politics • Organisational Culture • Organisational Change • Conflict and Negotiations ii TABLE OF CONTENTS 1 Introduction......................................................................................................................... 2 Structure of the Course....................................................................................................... 3 Course Aims and Objectives............................................................................................... 4 Tools for Learning in This...

Words: 79671 - Pages: 319

Premium Essay

Probability

...Probability & Statistics for Engineers & Scientists This page intentionally left blank Probability & Statistics for Engineers & Scientists NINTH EDITION Ronald E. Walpole Roanoke College Raymond H. Myers Virginia Tech Sharon L. Myers Radford University Keying Ye University of Texas at San Antonio Prentice Hall Editor in Chief: Deirdre Lynch Acquisitions Editor: Christopher Cummings Executive Content Editor: Christine O’Brien Associate Editor: Christina Lepre Senior Managing Editor: Karen Wernholm Senior Production Project Manager: Tracy Patruno Design Manager: Andrea Nix Cover Designer: Heather Scott Digital Assets Manager: Marianne Groth Associate Media Producer: Vicki Dreyfus Marketing Manager: Alex Gay Marketing Assistant: Kathleen DeChavez Senior Author Support/Technology Specialist: Joe Vetere Rights and Permissions Advisor: Michael Joyce Senior Manufacturing Buyer: Carol Melville Production Coordination: Lifland et al. Bookmakers Composition: Keying Ye Cover photo: Marjory Dressler/Dressler Photo-Graphics Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and Pearson was aware of a trademark claim, the designations have been printed in initial caps or all caps. Library of Congress Cataloging-in-Publication Data Probability & statistics for engineers & scientists/Ronald E. Walpole . . . [et al.] — 9th ed. p. cm. ISBN 978-0-321-62911-1...

Words: 201669 - Pages: 807

Free Essay

Industrial Engineering

...permitted under the United States Copyright Act of 1976, no part of this publication may be reproduced or distributed in any form or by any means, or stored in a database or retrieval system, without prior written permission of the publisher. This McGraw-Hill Create text may include materials submitted to McGraw-Hill for publication by the instructor of this course. The instructor is solely responsible for the editorial content of such materials. Instructors retain copyright of these additional materials. ISBN-10: 1121789048 ISBN-13: 9781121789043 McGraw-Hill Create™ Review Copy for Instructor Espinoza. Not for distribution. Contents 1. Preface 1 2. Methods, Standards, and Work Design: Introduction 7 Problem-Solving Tools 27 3. Tex 29 4. Operation Analysis 79 5. Manual Work Design 133 6. Workplace, Equipment, and Tool Design 185 7. Work Environment Design 239 8. Design of Cognitive Work 281 9. Workplace and Systems Safety 327 10. Proposed Method Implementation 379 11. Time Study 413 12. Performance Rating and Allowances 447 13. Standard Data and Formulas 485 14. Predetermined Time Systems 507 15. Work Sampling 553 16. Indirect and Expense Labor Standards 585 17. Standards Follow-Up and Uses 611 18. Wage Payment 631 19. Training and Other Management Practices 655 20. Appendix 1: Glossary 685 21. Appendix 2: Helpful Formulas 704 22. Appendix 3: Special Tables 706 23. Index 719 iii McGraw-Hill Create™ Review Copy for Instructor Espinoza. Not for distribution. Credits 1. Preface:...

Words: 294686 - Pages: 1179

Premium Essay

Holly Farm

...Robert Johnston Stuart Chambers Christine Harland Alan Harrison Nigel Slack Cases in Operations Management third edition Cases in Operations Management We work with leading authors to develop the strongest educational materials in operations management, bringing cutting-edge thinking and best learning practice to a global market. Under a range of well-known imprints, including Financial Times Prentice Hall, we craft high quality print and electronic publications which help readers to understand and apply their content, whether studying or at work. To find out more about the complete range of our publishing, please visit us on the World Wide Web at: www.pearsoneduc.com THIRD EDITION Cases in Operations Management Robert Johnston Warwick Business School, University of Warwick Stuart Chambers Warwick Business School, University of Warwick Christine Harland School of Management, University of Bath Alan Harrison Cranfield School of Management, Cranfield University Nigel Slack Warwick Business School, University of Warwick Pearson Education Limited Edinburgh Gate Harlow Essex CM20 2JE United Kingdom and Associated Companies throughout the world Visit us on the World Wide Web at: www.pearsoned.co.uk First published 1993 Second published 1997 Third Edition 2003 © Robert Johnston, Stuart Chambers, Christine Harland, Alan Harrison and Nigel Slack 1993, 2003 The rights of Robert Johnston, Stuart Chambers, Christine Harland, Alan Harrison...

Words: 207956 - Pages: 832

Free Essay

Test2

...62118 0/nm 1/n1 2/nm 3/nm 4/nm 5/nm 6/nm 7/nm 8/nm 9/nm 1990s 0th/pt 1st/p 1th/tc 2nd/p 2th/tc 3rd/p 3th/tc 4th/pt 5th/pt 6th/pt 7th/pt 8th/pt 9th/pt 0s/pt a A AA AAA Aachen/M aardvark/SM Aaren/M Aarhus/M Aarika/M Aaron/M AB aback abacus/SM abaft Abagael/M Abagail/M abalone/SM abandoner/M abandon/LGDRS abandonment/SM abase/LGDSR abasement/S abaser/M abashed/UY abashment/MS abash/SDLG abate/DSRLG abated/U abatement/MS abater/M abattoir/SM Abba/M Abbe/M abbé/S abbess/SM Abbey/M abbey/MS Abbie/M Abbi/M Abbot/M abbot/MS Abbott/M abbr abbrev abbreviated/UA abbreviates/A abbreviate/XDSNG abbreviating/A abbreviation/M Abbye/M Abby/M ABC/M Abdel/M abdicate/NGDSX abdication/M abdomen/SM abdominal/YS abduct/DGS abduction/SM abductor/SM Abdul/M ab/DY abeam Abelard/M Abel/M Abelson/M Abe/M Aberdeen/M Abernathy/M aberrant/YS aberrational aberration/SM abet/S abetted abetting abettor/SM Abeu/M abeyance/MS abeyant Abey/M abhorred abhorrence/MS abhorrent/Y abhorrer/M abhorring abhor/S abidance/MS abide/JGSR abider/M abiding/Y Abidjan/M Abie/M Abigael/M Abigail/M Abigale/M Abilene/M ability/IMES abjection/MS abjectness/SM abject/SGPDY abjuration/SM abjuratory abjurer/M abjure/ZGSRD ablate/VGNSDX ablation/M ablative/SY ablaze abler/E ables/E ablest able/U abloom ablution/MS Ab/M ABM/S abnegate/NGSDX abnegation/M Abner/M abnormality/SM abnormal/SY aboard ...

Words: 113589 - Pages: 455