Premium Essay

Pseudo-Code Structure

In: Computers and Technology

Submitted By akalex01
Words 765
Pages 4
Pseudo-code is an informal high-level description of the operating principle of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading. Pseudo-code typically omits details that are not essential for human understanding of the algorithm. The programming language is augmented with natural language description details, were convenient, or with compact mathematical notation. The purpose of using pseudo-code is that it is easier for people to understand than conventional programming language code, and that it is an efficient and environment-independent description of the key principles of an algorithm. Pseudo-code resembles, but should not be confused with skeleton programs, including dummy code, which can be complied without errors. Flowcharts and Unified modeling Language charts can be thought of as a graphical alternative to pseudo-code, but are more spacious on paper.
A sequence structure is represented in pseudo-code as a line of instruction. A pseudo-code statement representing sequence would typically contain text very similar to what is found within the rectangle of the flowchart. The sequence control structure simply lists the lines of pseudo-code. The concern is not with the sequence category but with selection and two of the iteration control structures. A good example is; if age greater than 17, display a massage indicating you can vote else display a message indicating you can't vote end. Below is some pseudo-code written for a program which moves a long as touch sensor is not pressed, but stops and turns to the right if its sonar detects an object less than 20in away. Task main, while (touch sensor is not pressed), Robot runs forward, if (sonar detects object less than 20in away), Robot stops, Robot turns right. This pseudo-code example includes…...

Similar Documents

Premium Essay

Array Structure

...Array Structure Joe Guckiean PRG/211 January 21, 2013 Vic Echeverria Array Structure The example used in the previous proposal did not contain an array structure. Therefore, a new example will be used for this paper. Arrays are an excellent way to gather and display data when the need for an external database is not required. An array essentially acts like a single variable that can store multiple chunks of data. Rather than acting like an individual box that can hold only one chunk of data, such as a single variable, an array acts like a big box divided into sections, where each section can store one chunk of data (Wang, 2011). There are two main types of arrays, single or multi-dimensional and parallel array. The most simple array involves a single data type. Names or items that are related to each other could be stored in a one dimensional array. A two dimensional array can have two types of data that are related to each other. An example would be a person’s name and age. Those two items are related to each other and would be represented in a table like structure. A parallel array consists of multiple arrays that act as a single array. For example, one array could contain names, a second could contain addresses, and a third could contain phone numbers. Each of the parallel arrays acts independently, but are related to each other. This proposal will be constructed using a parallel array displaying the population for the 88 counties in Ohio. Additional......

Words: 866 - Pages: 4

Premium Essay

Dual Code Structure

...Individual Paper Week Three Deana Webster University of Phoenix Individual Paper Week Three Originally, I started off by selecting Dual-Code Structure. It appeared that I would not be able to complete my programming with Single-Code Structure and yet I did. I believed that Dual-Code would start out by sending in one response if the patient was a Diabetic when the answer was yes the system would prompt it to a cascading set of questions. The group of questions which would be answered and the end of assessment message opens. “Thank You For Taking your Diabetic Assessment.” Sending the patient straight to the “Thank you,” message should they would answered “no” to the Diabetic question. After review I have used the Single-Code Structure (this structure being the basic structure that it is) actually exemplified my process much simpler and smoother. I feel that I achieved encapsulation process. It will not affect the collected data from one version to another if it were reused, so I think it would be perfect for this type of programming because it obtaining proprietary information. Therefore, there is some security with the data as it is being hidden. The Code starts off with: IF condition (diabetes) is true THEN statement(s) in true case ELSE statement(s) in false case ENDIF . The “:Then statement,” would lead you to answer the following cascading questions and that's......

Words: 403 - Pages: 2

Free Essay

Constructing a New Structure- Building Codes

...Constructing a new Structure- Building Codes The information in this document should be useful in making design-related decisions that will not only satisfy the move to our new building Information Technology (IT) requirements but also meet the needs of the building and its future occupants with respect to voice, video and data communications. The intention of this document is to provide a comprehensive understanding and reference guide that can be referred to when moving to our new building. Moving into our new building we need to follow certain cable codes and specification. A properly designed network is based around components or wiring units. The components should also follow certain performance specifications so that when installing we will know exactly what types of applications will be supported. The cable specifications and building codes requirements that we use will be based on * ANSI/EIA/TIA standards 568-C-- Commercial Building Telecommunications Cabling Standard * ANSI/EIA/TIA 569-- Commercial Building Standards for Telecommunications Pathways and Spaces; ANSI/EIA/TIA 606- Administration Standard for the Telecommunications Infrastructure of Commercial Buildings * ANSI/EIA/TIA 607-Commercial Building Grounding and Bonding Requirements for Telecommunications; BICSI Telecommunications Distribution Methods Manual (TDMM) and NFPA 70--National Electric Code (NEC). Cabling has changed over time. Cabling installations have evolved from proprietary......

Words: 2982 - Pages: 12

Premium Essay

Personal Learning Management Array Structure

...Personal Learning Management Array Structure Giovonnte J. Tate PRG/211 March 31, 2014 Travis Sprouse Object-Oriented Programming Parallel array structures can be used for many instances where the programer wants to input information that is different to them, such as keeping track of their important items of learning. The whole process of creating a program is of a structured nature. Code does not have to be difficult and can be written in simple English. What programmers need to do is input the data into the program and if it is functioning properly, a result based on that data and output will appear. All results come from a calculated list of items that have a represented value declared by the programmer. Arrays have been used in lots of problems to arrive at solutions for tasks and routines that people are involved in day to day. The For Loop and data sharing elements make the structure a desirable solution to any situation where programmers need to write codes and programs for a problems with many working parts, such as the me with several classes with a value rating applied. The data shared between the elements, assignments and projects completed, has to be shared in order to get your results. The most logical solution is the use of a parallel array structure. To test this conclusion, a pseudo code has been written and executed and is operating with satisfactory results. The pseudo code for this particular program is written as follows: Economic......

Words: 675 - Pages: 3

Premium Essay

Unit 3: Lab 1: Building a New Structure - Nfpa Codes

...Unit 3: Lab 1: Building a New Structure – NFPA Codes The transmission of words, sounds, images, or data in the form of electronic or electromagnetic signals or impulses: Telecommunications what a concept. In order for us as a person and an IT Administrator is to stay safe. History has shown the safety departments about having to write policies which are used to provide recommended practices for the design and installation of safety standards with the Telecommunications infrastructure that will support a wide variety of existing and future services, using industry accepted design and installation methods. To define standards that will enable the design and implementation of structured cabling systems for commercial buildings and between buildings. The telecommunications industry standards, codes and practices are defined in various state and agencies on web sites defined in a catalog that can purchase and downloaded and read for immediate enforcement of these guidelines used for each industry. These policies are intended to answer faxes of infrastructure practices and not to be a substitute for knowledge of industry accepted practices, standards and codes. Policies are not intended to be used in lieu of a construction specification document, are used to abide to the specifications. Communications technologies can be complex and designed and installed by experienced professionals. Telecommunications are considered a fourth utility, to be designed, funded and installed......

Words: 1394 - Pages: 6

Free Essay

Pseudo Code

...pattern in each of the design structures: SEQUENCE:    keep  statements  that  are  “stacked”  in  sequence  all  starting  in  the   same column. SELECTION: indent the statements that fall inside the selection structure, but not the keywords that form the selection LOOPING: indent the statements that fall inside the loop, but not the keywords that form the loop EX: In the example above, employees whose grossPay is less than 100 do not have any deduction. TASK LIST: Read name, hourly rate, hours worked, deduction rate Compute gross, deduction, net pay Is gross >= 100? YES: calculate deduction NO: no deduction Write name, gross, deduction, net pay PSEUDOCODE: READ name, hourlyRate, hoursWorked grossPay = hourlyRate * hoursWorked IF grossPay >= 100 deduction = grossPay * deductionRate ELSE deduction = 0 ENDIF netPay = grossPay – deduction WRITE name, grossPay, deduction, netPay 4. End multiline structures See how the IF/ELSE/ENDIF is constructed above. The ENDIF (or END whatever) always is in line with the IF (or whatever starts the structure). 5. Keep stmts language independent Resist the urge to write in whatever language you are most comfortable with. In the long run, you will save time! There may be special features available in the language you plan to eventually write the program in; if you are SURE it will be written in that language, then you can use the features. If not, then avoid using the special features. SELECTION STRUCTURE We looked at this......

Words: 1559 - Pages: 7

Premium Essay

Code Red

...Code Red was a computer worm observed on the Internet on July 15, 2001. It attacked computers running Microsoft's IIS web server. The Code Red worm was first discovered and researched by eEye Digital Security employees Marc Maiffret and Ryan Permeh. They named it "Code Red" because Code Red Mountain Dew was what they were drinking at the time. Although the worm had been released on July 13, the largest group of infected computers was seen on July 19, 2001. On this day, the number of infected hosts reached 359,000. The worm exploited a vulnerability in the indexing software distributed with IIS, described in Microsoft Security Bulletin MS01-033. The worm spread itself using a common type of vulnerability known as a [[buffer overflow]]. It did this by using a long string of the repeated character 'N' to overflow a buffer, allowing the worm to execute arbitrary code and infect the machine. Kenneth D. Eichman was the first to discover how to block it. Days 1-19: Trying to spread itself by looking for more IIS servers on the Internet. Days 20–27: Launch [[denial of service]] attacks on several fixed [[IP address]]es. The IP address of the [[White House]] web server was among those. Days 28-end of month: Sleeps, no active attacks. When scanning for vulnerable machines, the worm did not test to see if the server running on a remote machine was running a vulnerable version of IIS, or even to see if it was running IIS at all. The worm's payload is the string following the last 'N'.......

Words: 383 - Pages: 2

Premium Essay

Parapsychology: Science or Pseudo-Science?

...In the scientific field, Parapsychology, the investigation of paranormal and psychic phenomena, is determined as pseudo-science. The difference between science and pseudo-science is pseudo-science is considered not genuine. In the article, Parapsychology: Science or Pseudo-Science, the explanation that Parapsychology is considered pseudo-science is researched based. The descriptive research method is the method that is used because it describes the difference between how science and pseudo-science is differentiated. The author doesn’t necessarily give specific experiment examples to answer the questions that are used as headings, though she describes what some psychologists have said about the subject and how they feel about it. Though while being a good research method, there are some flaws in it. Marie-Catherine Mousseau does a very good job of describing both researchers and mainstream scientists and how science and pseudo-science are related and not related. For both types of scientists, the real question was if there was any progress in parapsychology or not. Some said yes, some said no. Though, there were some flaws in this where Mousseau could have used more specific examples to explain and describe the reason behind their thoughts. That would help the reader truly understand the concept of where the scientists are coming from and where they get their information from. It is also a visual help for the reader because if the experiment is described properly, the......

Words: 553 - Pages: 3

Free Essay

Intro to Programming Pizza Pi Iii Pseudo Code

...* Declarations * Constants are needed for * The minimum size a user can enter * 12 * The maximum size a user can enter * 36 * The # of slices in a small pizza * 8 * The # of slices in a medium pizza * 12 * The # of slices in a large pizza * 16 * The # of slices in an extra-large pizza * 24 * Variables are needed for * A Boolean for whether or not the program should exit, set to false by default * A Boolean for whether or not the input passed validation, set to false by default * A String for what the user inputs * An Integer for what the pizza’s diameter is, assuming it passes validation * Input * Ask the user for input and then read it * If the user input is the number 0, the exit variable is set to true and the loop is broken * Check if the input is valid, to be valid it must meet these parameters * Input must be above the number 12 * Input must be below the number 36 * Input must be a number * If the input is not between 12 and 36, tell the user and loop back to the initial prompt * If the input is not between a number, tell the user and loop back to the initial prompt * If validation is passed, the validation variable is set to true and the loop is ended * Processing and Output * If the validation...

Words: 341 - Pages: 2

Free Essay

Unified Accounts Code Structure

...Republic of the Philippines DEPARTMENT OF BUDGET AND MANAGEMENT COMMISSION ON AUDIT DEPARTMENT OF FINANCE UACS Unified Accounts Code Structure FAQs UACS Unified Accounts Code Structure FAQs TABLE OF CONTENTS 1. What is the Unified Accounts Code Structure? 3 2. Why a UACS? 3 3. Where will UACS be used? 3 4. Who will use the UACS? 4 5. How will UACS improve financial reporting? 4 6. What are the reporting requirements that will be best served by the UACS? 4 7. What document provides guidance on the use of the codes? 4 8. What policies and systems will be affected or need to be modified to implement UCAS? 4 9. What are the key elements of the UACS and how many codes are there for each element? 5 10. Do we really need the 54-digit code to implement UACS? 5 11. What are UACS users required to identify in facilitation data integrity of the Funding Source Code? -----------------------------------------------------------------------------------------------------------------------------------------5 12. What is the business rule to facilitate data integrity of the organization? 5 13. Under the UACS Location Code, are the codes the same codes that are being used now? 6 14. In preparing the budget for execution, can we use the current chart of accounts of COA on object coding? 6 15. What are the key business rules for code management to preserve transaction history and to ensure financial and performance data for one year is comparable with data from......

Words: 1523 - Pages: 7

Free Essay

Code

...This  is  CS50.   Harvard  College  Fall  2010   Problem  Set  3:  The  Game  of  Fifteen     due  by  7:00pm  on  Fri  10/1     Per  the  directions  at  this  document’s  end,  submitting  this  problem  set  involves  submitting  source  code   on  cloud.cs50.net  as  well  as  filling  out  a  Web-­‐based  form  (the  latter  of  which  will  be  available  after   lecture  on  Wed  9/29),  which  may  take  a  few  minutes,  so  best  not  to  wait  until  the  very  last  minute,     lest  you  spend  a  late  day  unnecessarily.     Be  sure  that  your  code  is  thoroughly  commented   to  such  an  extent  that  lines’  functionality  is  apparent  from  comments  alone.       Goals.     •   Introduce  you  to  larger  programs  and  programs  with  multiple  source  files.   •   Empower  you  with  Makefiles.   •   Implement  a  party  favor.       Recommended  Reading.     •   Section  17  of  http://www.howstuffworks.com/c.htm.   •   Chapters  20  and  23  of  Absolute  Beginner’s ......

Words: 4248 - Pages: 17

Free Essay

Analyse How Effective the Composer of the Road Has Been in the Use of Narrative Codes and Structures in Shaping the Underlying Concerns of the Text.

...Cormac McCarthy’s dystopian novel, The Road, effectively utilises narratological techniques and structures to convey complex ideas of the importance of hope, morality versus survival, and the integral role of relationships between humans in surviving extreme circumstances. An essential component of survival under conditions of great adversity is a drive to survive and a hope for the future. McCarthy’s protagonist knows that his quest to head “to the South” is fruitless; he knows he is going to die “Sometime. Not Now.” However he recognises that without some kind of goal or destination, humanity has no purpose. McCarthy utilises aspects of the symbolic code to illustrate how keeping the boy alive has become the man’s sole purpose for carrying on; he represents his father’s drive and his hope for the future. This is displayed in a synchronic analeptic episode through the contrast between the father’s devotion and the reaction of the mother; “The one thing I can tell you is that you won’t survive for yourself. I know because I would have never come this far.” She cannot place her hope and her motivation to continue in the boy like the father can, and as such succumbs to the world she is a part of. The semantic code is also utilised through the continued reference to fire to further develop how the pair’s hope allows them to survive. The audience associates fire with resilience and spirit, such that when the pair continually discuss how they are “carrying the fire” the reader......

Words: 894 - Pages: 4

Free Essay

Code

...States by corporations, institutions, and other organizations. For more information, please contact the Special Markets Department at the Perseus Books Group, 11 Cambridge Center, Cambridge MA 02142, or call (617) 252-5298, (800) 255-1514 or e-mail special.markets@perseusbooks.com. CIP catalog record for this book is available from the Library of Congress. ISBN-10: 0–465–03914–6 ISBN-13: 978–0–465–03914–2 06 07 08 09 / 10 9 8 7 6 5 4 3 2 1 Code version 1.0 FOR CHARLIE NESSON, WHOSE EVERY IDEA SEEMS CRAZY FOR ABOUT A YEAR. Code version 2.0 TO WIKIPEDIA, THE ONE SURPRISE THAT TEACHES MORE THAN EVERYTHING HERE. C O N T E N T S Preface to the Second Edition Preface to the First Edition Chapter 1. Code Is Law Chapter 2. Four Puzzles from Cyberspace PART I: “REGULABILITY” ix xiii 1 9 Chapter 3. Is-Ism: Is the Way It Is the Way It Must Be? Chapter 4. Architectures of Control Chapter 5. Regulating Code PART II: REGULATION BY CODE 31 38 61 Chapter 6. Cyberspaces Chapter 7. What Things Regulate Chapter 8. The Limits in Open Code PART III: LATENT AMBIGUITIES 83 120 138 Chapter 9. Translation Chapter 10. Intellectual Property Chapter 11. Privacy Chapter 12. Free Speech Chapter 13. Interlude PART IV: COMPETING SOVEREIGNS 157 169 200 233 276 Chapter 14. Sovereignty Chapter 15. Competition Among Sovereigns 281 294 PART V: RESPONSES Chapter 16. The Problems We Face Chapter 17. Responses Chapter 18. What Declan Doesn’t Get Appendix Notes......

Words: 190498 - Pages: 762

Free Essay

Icao Codes

...identification simple and clear. Code selections in North America were based on existing radio station identifiers. For example, radio stations in Canada were already starting with "C", so it seemed logical to begin Canadian airport identifiers with Cxxx. The United States had many pre-existing airports with established mnemonic codes. Their ICAO codes were formed simply by prepending a K to the existing codes, as half the radio station identifiers in the US began with K. Most ICAO codes outside the US and Canada have a stronger geographical structure. Most of the rest of the world could be classified in a more planned top-down manner, as they didn't have as much established aviation legacy. Thus Uxxx referred to the Soviet Union with the second letter denoting the specific region within it, and so forth. Europe had too many locations for only one starting letter, so it was split into Exxx for northern Europe and Lxxx for southern Europe. The second letter drilled down: EGxx was the United Kingdom (G for Great Britain), EDxx was West Germany (D for Deutschland), ETxx was East Germany (the ETxx code was reassigned to military fields after the reunification), LExx was Spain (E for España), LAxx was Albania, and so on. France was designated LFxx, as the counterpart EFxx was the unambiguously northern Finland. (originally OFxx, as the more rigid geographical structure evolved over time; in the beginning, countries usually had "blocks" of codes; for example, Finland still has......

Words: 982 - Pages: 4

Free Essay

Pseudo Classes

...“Pseudo-classes are similar to classes, but they are not explicitly present in the HTML; they don’t need to be added to your code. Basically, they are keywords in CSS that can be added to a selector to specify a special state of the element”. (Michaud 72) I feel that as one grows in his or her abilities as a web designer or developer we must use all the tools available to be affective in our field. CSS styling and all the tools that are in that tool box must be continually developed to stay relevant. Pseudo classes are an expansion of the CSS styling coding that enables designers to focus on specific elements that they desire to accent. In CSS, designers can apply styles to elements in these states using a specific kind of selector called a pseudo-class selector. It’s an odd name, but you can think of it as though elements in a certain state belong to the same class. “Pseudo-class selectors are indicated by the colon (:) character. They typically go immediately after an element name”. (2013 Servage) In there simplest form pseudo –classes selectors target links on whether they have been clicked on. Link and visited type pseudo classes are considered dynamic pseudo class because they are only active due the users interaction with them on the page. “Types of dynamic pseudo-class targets element states that result from direct user actions. focus Applies when the element is selected and ready for input: hover Applies when the mouse pointer is over the element: active......

Words: 384 - Pages: 2