Premium Essay

Code

In: Computers and Technology

Submitted By zz06
Words 712
Pages 3
Pseudocode syntax, descriptions and examples
Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference and copy and paste code examples into your projects to ensure you are using proper syntax. Be sure to indent your code to make it more readable and use modify and enhance from the examples as needed. Also, capitalize the first letter of your pseudocode (e.g.
While, not while).
Pseudocode
Write/Prompt

Description
Displays messages and other information on the screen

Flowchart equivalent

Write “What is your name?” Input

Pauses execution, allowing the user to enter data

Input FirstName
Input FirstName

Compute/Set

Assigns a value to a variable
Set
Avg=(num1+num2)/2

Declare

Example usage
Write “What is your name?”
Write “Your name is “ +YourName + “.”
Prompt for ItemName, Price, Quantity

Declares a variable to be of a specific type

Input Number1, Number2

Compute average value:
Set Avg= (num1 + num2)/2
Compute total cost:
Set TotalCost= 1.25*Songs

Declare FirstName As String
Declare FirstName as String

Declare Num1, Num2 As Integer
Possible datatypes may include:
String
1

Call

Requests a module, subprogram, or function be executed Call WriteNums(num1, num2))

If
End If

Tests if a condition is met. If the test condition is true, the statements are executed.

Enter

Is
Number <
5?

Character
Integer
Float
Main Module
Write “Enter 2 numbers”
Input Num1,Num2
Call WriteNums(num1,num2)
Write “Program complete”
End Program
Subprogram WriteNums(Float num1,
Float num2)
Write “Num1 is “ + num1
Write “Num2 is “ + num2
End Subprogram

Input Number
If Number < 5 Then
Write “OK”
End If
No

Yes
Write “OK”

Exit

2

If
Else
End If

Input Age
If Age > 18 Then
Write” You are an Adult”
Else
Write” You are Young”
End If

Enter

Tests If a condition is true. If the test

Similar Documents

Free Essay

Assigning Evaluation and Managment Codes

...Assigning evaluation and management codes By Tina Cunningham Initial consultation is performed of a 78 year old female with unexpected weight loss, abdominal pain, and rectal bleeding. A comprehensive history and examination is performed. I would code this 99205 The comprehensive history of the patient with detailed history. A 30 year old patient presents complaining of flu-like symptoms characterized by unremitting cough, sinus pain, and thick nasal discharge. An examination reveals bronchitis and sinus infection. The patient is prescribed a 5- day course of Zithromax. I would code this 99202 the examination was detailed, complaint addressed, and medical decision established. Established patient in lithium presents for routine blood work to monitor therapeutic levels of kidney function. A nurse reviews the results and advices the patient that tests are normal, and no change in dosage is indicated. I would code this 99211 the patient is an established patient and patient has the two components that is required. A 62- year old diabetic female presents for checkup and dressing change of wound on left foot. An examination reveals the wound is healing. The nurse applied new dressing and 0patient will return for a checkup in one week. I would code this as 99212 the patient has had history of the wound, the examination is on the wound and a medical decision was established. A mother brings in her 6 month old male child for a routine...

Words: 270 - Pages: 2

Premium Essay

Code Meshing Vs Code Switching

...Code Meshing vs. Code Switching: Which One Should be Taught in Schools? In the article “Twitterish,” John McWhorter explains the need for different forms of literacy and multimodality – Standard English and new digital literacies. He also, in a way, talks about code switching and code meshing because he shows how people can switch between different literacies and how they can also incorporate both Standard English and digital literacies into speech and writing together. John White’s paper goes into much greater detail about what code switching is and how to teach it in schools. He says that code switching – the act of changing from a culturally imbued discourse to Standard English, but not necessarily vice versa – is a priority to teach to...

Words: 914 - Pages: 4

Free Essay

Google Code

...Using Google Code and SVN to Manager project Source Code Sep. 3 Project Source Code Manager on Google Code Using NetBean IDE and SVN 1 MrToanDH * C0907i * FptAptech Using Google Code and SVN to Manager project Source Code Sep. 3 Contents I. Google Code là gì? ............................................................................................................. 3 II. 4 bước để tạo Project trên Google Code:.......................................................................... 4 III. Thiết lập các chức năng cho project : ............................................................................. 7 1.Trang chủ project (Project Home) : ................................................................................ 7 2.Thêm và quản lý các thành viên của 1 project : ............................................................. 8 3.Chức năng download : .................................................................................................... 9 4.Xóa project : ................................................................................................................. 11 IV. Giới Thiệu Về Subversion: .............................................................................................. 12 V. 2 cách cơ bản để quản lý Source code với SVN : ............................................................ 13 1.Thao tác với file và Folder : .............................................................................................

Words: 2085 - Pages: 9

Premium Essay

Code of Ethics

...Code of Ethics Teresa Sieck ETH/ 316 July 2, 2012 Ed McCullough Code of Ethics A code of ethics is a collection of principles practiced and followed by management of businesses and corporations around the world (Spiro, 2010). A businesses code of ethics works with a company’s mission statement and policies of conduct that gives employees, partners, venders, and outsiders an understanding of what the company stands for and believes in (Boylan, 2009). It should address the differences or variations in both company’s industry and its broader goals for social responsibility (How to create a company code of ethics, 2012). It should be strong enough to serve as a guide for employees with questions to resolve issues on their own if needed (Trevino & Nelson, 2007). Wal-Mart is one of the largest corporations in the United States. As one of the largest corporations the company has a social responsibility to their employees, customers, and the community. The code of ethics works with and around these principals. Wal-Mart has three basic principles, 1) respect for the individual, 2) service to the customer, and 3) striving for excellence (What is Wal-Mart’s Code of ethics, 2011). The following is an example of what a code of ethics could be and what values a business may have. Vision Statement: People are assets not possessions; employees, customers, and communities should be treated with fairness, respect, honesty and integrity. The corporation’s global vision is to...

Words: 1066 - Pages: 5

Free Essay

Gray Code

...What is Gray code? From Wikipedia The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only one bit. The reflected binary code was originally designed to prevent spurious output from electromechanical switches. Today, Gray codes are widely used to facilitate error correction in digital communications such as digital terrestrial television and some cable TV systems. One good way to explain the use of Gray code is to take a look at how a hard drive work, in extreme simplicity. A hard drive contains a disc where information is stored. The information on the disc is stored in ones and zero´s, binaries. The disc is divided into sections which each has a binary signature. Here is a picture to explain: As we can see here, section 0 for example has the binary signature 0000 and section 15 has the binary signature 1111. When a hard drive is running it reads section by section and if the hard drive for some reason has a failure and the reader jumps from section 15 to section 0 the reading changes from 0000 to 1111 which means that every bit read is faulty. This could change alot depending on how the information is parsed. A hard drive could be exposed to a lot of external forces and the reader can jump and missread at any time. This cannot be forseen, but it can be prevented to some extent. Enter Gray code. Gray code is a way to sort the binaries so that one binary never...

Words: 1010 - Pages: 5

Premium Essay

Code of Hammurabi

...present day is known as Iraq. (Ancient Mesopotamia) Hammurabi created a list of rules and laws for the people of his empire to follow called “The Code of Hammurabi”. This is one of the oldest and most detailed documents in existence and gives insight as to how the members of Babylonian society lived. The code listed 282 rules for society to obey by and the consequences or guidelines for each member given their social status and their gender. There were rules of every category. From marriage and adultery, criminal acts such a stealing, property, and monetary trading. What’s interesting about this rulebook is the detail and coverage of the book. While in today’s world we may not follow rules such as “An eye for an eye, and a tooth for a tooth” like the Code of Hammurabi, whose punishments for a crime were much more extravagant and gruesome at times. There was segregation in gender and social status. The topics addressed in the code are some of the same topics addressed that we, today, value and instill. In today’s government we have laws of crime and punishment, monetary laws, and laws regarding marriage. We have these laws so we can have structure and a successful government and society. It’s amazing how such early civilization started these fundamentals and on some linear level, had the same values. Not discovered until 1901, the Code of Hammurabi shows us how Hammurabi viewed himself and the people of Babylon. This insight is significant. Hammurabi believed he could run his empire...

Words: 2731 - Pages: 11

Free Essay

Code Obfuscation

...Code Obfuscation One of a company's biggest concerns is that their software falls prey to reverse engineering. A secret algorithm that is extracted and reused by a competitor can have major consequences for software companies. Also secret keys, confidential data or security related code are not intended to be analysed, extracted and stolen or even corrupted. Even if legal actions such as patenting and cyber crime laws are in place, reverse engineering remains a considerable threat to software developers and security experts. In software development, obfuscation is the deliberate act of creating obfuscated code, i.e. source or machine code that is difficult for humans to understand. Programmers may deliberately obfuscate code to conceal its purpose (security through obscurity) or its logic, in order to prevent tampering, deter reverse engineering, or as a puzzle or recreational challenge for someone reading the source code. Programs known as obfuscators transform readable code into obfuscated code using various techniques. Obfuscation present the concept of code encryption, which offers confidentiality, and a method to create code dependencies that implicitly protect integrity. This paper majorly focuses on obfuscating java code. This research topic will give more knowledge on how to protect a java software from a tampering. I can use these concepts in my future work and give suggestions to the team/group. This not only extends my knowledge on this topics, I will learn how...

Words: 258 - Pages: 2

Free Essay

Dress Code

...Dress Code: To Be or Not to Be A dress code may be a hard rule to put into practice. Although it is hard to implement, studies have been done that show that schools with a dress code have better performance. Not everyone agrees a school having a dress code, which makes it hard to execute. People can argue that it is a good idea or it is a bad idea. I think it is a good idea to have some sort of a dress code, but not to the point where students have to wear the same uniform every day. Everyone wants there kid to do well in school. Studies show that the schools that have strict dress codes do better than schools that do not have dress codes. When you have a certain structured dress code, kids are less likely to worry about what they are wearing and focus more on the schooling. If you require the students to wear uniforms all of the time, the use of the same colors could possible cause depression with the kids. Instead of making them wear a uniform every day, make them wear one on certain days of the week. Variety of clothes and being able to pick what you want to wear is a fun part of school for most people. When required to wear certain uniforms, depending on what they are, the students could have better school spirit. On the other hand, they could go completely against the school for requiring them to have to wear uniforms. Someone will not like the uniform no matter how nice it is that is just the way it is. Everyone wants to show off their new clothes they...

Words: 671 - Pages: 3

Premium Essay

Code of Hammurabi

...Code of Hammurabi Western Civilization and the World I 100 Professor Preface This paper will examine the Code of Hammurabi and how it affected the people of Babylon before, during and after its creation. The nature of the topic is to have a better understanding of how the Code of Hammurabi changed society, hindered women’s rights and independence and left a lasting impression for future generations. Chronology 1810 BC Hammurabi was born to the then-king of Babylon Sin-muballit. 1792 BC Hammurabi, king of Babylon, started his rule. 1787 BC King Hammurabi captured Uruk and Isin. 1784 BC King Hammurabi campaigned against Rapigum and Malgium. 1772 BC Code of Hammurabi was created. 1763 BC With the aid of Mari and Eshnunna King Hammurabi conquered Larsa, putting an end to the long reign of Rim-Sin I. 1755 BC Captured Eshnunna which was the last of his Mesopotamian rivals. 1750 BC King Hammurabi died and passed the reigns of the empire to his son, Samsu-iluna. 1738 BC Under Samsu-iluna’s rule his empire fell to the Sealand Dynasty. 1595 BC Babylonian empire restored to glory of the Hammurabi’s age. 1901 Code of Hammurabi monument is discovered by French archaeologists. 1910 The Code of Hammurabi was translated by Leonard William King. During the rule of King Hammurabi he wrote the Code of Hammurabi. This consisted of many laws that changed the society, hindered women’s rights and independence and left a lasting impression for future generations...

Words: 2447 - Pages: 10

Premium Essay

Dree Code

...Dress Codes In Junior High And High Schools? Name: Institution: Should There Be Dress Codes In Junior High And High Schools? Introduction The dress code for junior and high schools has been a hot debate over the years. It has sought to address various issues and have resulted in different levels of controversy. For instance, in the early 1970s boys with long hair sometimes got attracted to their classmates. Resultantly, schools required young men to cut their hair short. Moreover, at the beginning of the 1990s several organizations and parents pushed for a dress code as a strategy to curb gang-related violence (Valdez, 2015). Over the years, the desire to create a professional school environment and reduce struggle over designer clothes made uniforms and dress codes become a familiar topic. However, identical strategies are more restrictive than dress code policies. Dress codes are strict as in the case of schools in California and Napa. For instance, schools in this areas required students to put on solid colors and logos or banned images on clothes. The primary objective of this argumentative essay is to provide adequate evidence that there should be dress codes in both junior and high schools. Claim 1: dress code may increase student safety and reduce crime. Each year several schools adopt a certain form of dress code. Although some challenges are emerging on the constitutionality, court’s rulings have supported dress codes that...

Words: 1717 - Pages: 7

Free Essay

Qr Codes

...list I compiled of positives and negatives concerning QR codes. Pros Easy to make. All you really need is a free QR code generator, and there are plenty of them floating around the Internet. Cost effective. Since most of the QR code generators are free, making the actual codes is inexpensive. The cost of printing materials can also remain relatively low, since they can be used on business cards or stickers. Stores can print their QR codes in ads, which they already invest money into. Anyone can make a QR code. Saves paper. People can scan a QR code to do things like enter contact information or store a coupon on a cellphone. Instead of having to carry paper coupons, people can just scan a QR coupon and have it available in their phone. Very quick transfer of information. Since the advent of DSL internet and now the 4G network for cellphones, people have gotten very used to getting information very quickly. Relatively small in size. This makes the codes great to put on business cards, in a corner of an ad, somewhere on a coupon, or anywhere there is a small bit of space. These codes can be made much smaller than the information they contain. So instead of placing a long, ugly, URL, on an advertisement or resume, simply place a small QR code. Cons Potential for over usage. Marketers should be aware that placing a QR code absolutely everywhere can be overkill. Reputation issues. Many people are making their QR code that link to social media, such as Facebook. This might...

Words: 500 - Pages: 2

Free Essay

Reusability of Code

...Reusability of Code One of the key factors for large software development projects is the ability to reuse code amongst team members. This allows for efficiency and reduces the time to get a software product delivered to a customer (or brought to market). This paper is intended to focus on the different areas that would benefit a software development team (or company) by having a structured and reusable code library in place. I have experience in supporting large ECM (Electronic Content Management) systems and I will refer to these re-world scenarios throughout this document. Reusability refers to the ability for a single developer that specializes in one area (or is assigned the task of developing) to develop a class or specific code that can then be used by other developers. As an example, a senior developer defines a class that serves as a blueprint for developing various objects that would input data into a Filenet ECM system. Once this class has been defined and created, other developers can reuse this class to develop objects that allow for public input and that will eventually store data in the ECM database. This stored data that is specifically formatted to be read by the Filenet application, allows end users to run reports that have a specific output that the want to view. In essence, the reusability of code is akin to manufacturing one part of a car that can then be used for many cars (such as a single frame that can hold various models of cars). The developer...

Words: 317 - Pages: 2

Free Essay

Code of Ethics

...Iranian Journal of Public Health Tehran University of Medical Sciences The Code of Ethics for Nurses F Zahedi, M Sanjari, [...], and M Vahid Dastgerdi Additional article information Abstract Nurses are ever-increasingly confronted with complex concerns in their practice. Codes of ethics are fundamental guidance for nursing as many other professions. Although there are authentic international codes of ethics for nurses, the national code would be the additional assistance provided for clinical nurses in their complex roles in care of patients, education, research and management of some parts of health care system in the country. A national code can provide nurses with culturally-adapted guidance and help them to make ethical decisions more closely to the Iranian-Islamic background. Given the general acknowledgement of the need, the National Code of Ethics for Nurses was compiled as a joint project (2009–2011). The Code was approved by the Health Policy Council of the Ministry of Health and Medical Education and communicated to all universities, healthcare centers, hospitals and research centers early in 2011. The focus of this article is on the course of action through which the Code was compiled, amended and approved. The main concepts of the code will be also presented here. No doubt, development of the codes should be considered as an ongoing process. This is an overall responsibility to keep the codes current, updated with the new progresses of science and emerging challenges...

Words: 3684 - Pages: 15

Free Essay

Code of Conduct

...an effective program is necessary. The Federal Sentencing Guidelines for Organizations encourages firm to set up ethics programs. Review this Website, located here , prior to doing the assignment. Write a 4-6 page paper in which you: 1. Briefly describe your company and then benchmark the codes of conduct used by similar companies in the industry. Critique the codes of conduct of at least three (3) similar companies in order to write codes for your company. 2. Analyze ways ethical challenges affect your business and create a code of conduct for your company. Provide a rationale on how these specific codes enhance your company’s ethics program. 3. After reviewing the Federal Sentencing Guidelines for Organizations, explain how these guidelines influence the ethics program you created. 4. Anticipate where the challenges or setbacks may be in the adoption and enforcement of the codes of conduct for your company. Explain how you will address these challenges and anticipated setbacks. 5. Given the influences of changing economic, political, social, cultural, and technological forces on business and society, explain how you can ensure that your codes of conduct will remain relevant in the years ahead. Your assignment must follow these formatting requirements: 1. Be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides; references must follow APA or school-specific format....

Words: 434 - Pages: 2

Premium Essay

Code of Ethics

...Code of Ethics Bus/210 Friday December 12, 2013 Jeannette Lipford This code of conduct will help guide the ethical business practices of all persons and employees of Angie’s Computer Repair Service. These codes will define the responsibilities for each and every employee of Angie’s Computer Repair Service. by protecting our business reputation as ethical and a reliable Computer Repair Service. As a company we will comply with all the state and local laws, Employees will conduct themselves in a professional manner when dealing with company business. Employees will not discriminate against one another do their gender, race, religion, or beliefs we will be treated fairly and equally. There will be a zero tolerance for harassment of any sort whether it is intentional or unintentional. All employees including myself must be able to depend on each other’s truthfulness as well has have the ability to be able to step up and bring issues and concerns to the proper people. We will strive to provide excellent customer service to our clients. Employees will do what is in the best interest of the company to help the company to continue to grow and gain new business. Failing to protect the company’s interest along with our affiliates may result in suspension and or termination. We here at Angie’s Computer Repair Service pride ourselves on maintaining our good reputation within the community. Therefore these rules will be the standard functions of our good business practices;...

Words: 301 - Pages: 2