Premium Essay

Unit 3 Homework

In:

Submitted By Shawn25
Words 412
Pages 2
Short answer:
5. Variable type and identifier.
6. Some languages assign a default value as 0 to uninitialized variables. In many languages, uninitialized variables hold unkown values.
Algorithm Workbench
3. a. Adds 2 to a and stores the result in b
Set b= 2 +a
b. Multiplies b times 4 and stores the result in a set a= b*4
c. Divides a by 3.14 and stores the result in b set b= 3.14/b
d. Subtracts 8 from b and stored the result in a set a= b-8
4.
a. set result= x+y= 4+8
b. set result=z*2= 2*2
c. set result= y/x= 8/4 set result= y-z= 8-2
5. Floating-point variable cost
6. Initialize the variable with the value 0.
Declare Real price=53.85
Display "the original price."
Input item original price
Display "price"
7. Count:=27
8. Set total=10+14
9. Declare Integer downPayment
Declare Integer Total
Declare Integer Due
10. Dim subtotal As Double = 0 totalfee = subtotal * 0.15

Programming Exercise:
6. Sales Tax
Design a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county tax. Assume the state sales tax is 4 percent (.04) and the county tax is 2 percent (.02). The program should display the amount of the purchase, the state sales tax, the county sales tax, the total sales tax, and the total of the sale (which is the sum of the amount of the purchase plus the total sales tax). int main
{ double amtPurch double stateTax double countryTax cout << "How much did you purchase?"; cin >> amtPurch; stateTax = STATE_SALES_TAX * amtPurch; countyTax= COUNTRY_SALES_TAX * amtPurch; cout<< "State sales tax:\n"<<stateTax<<]n << "Country sales tax: \n" << countryTax; }

8. Tip, Tax and Total
Design a program that calculates the amount of a meal purchased at a restrurant. The program should ask the user to enter the charge for the food, and

Similar Documents

Free Essay

Unit 3 Homework for Wan

...Configuration – routername(config-if)# Router Configuration – routername(config-line)# Basic Configuration Exercise 1. Router>enable Router#configure terminal Router(Config)#hostname AUS AUS(config)#end 2. AUS(config)# Enable Password class AUS(config)#Enable Secret class 3. Secret will supersede Password as the enable password. You do not need both, but you should have Secret over Password, as it is more secure. 4. AUS(config)#line con 0 AUS(config-line)#password cisco AUS(config-line)#login AUS(config-line)#line aux 0 AUS(config-line)#password cisco AUS(config-line)#login 5. AUS(config)#line vty 0 4 AUS(config)#password cisco AUS(config)#login 6. Aus(config)#service password-encryption 7. The secret password has stronger encryption than encrypting all passwords. 8. AUS(config)#line serial 0/0 AUS(config-if)#ip address 10.2.0.1 255.255.0.0 AUS(config-if)#clock rate 64000 AUS(config-if)#no shutdown 9. AUS(config)#interface fastethernet 0/0 AUS(config-if)#ip address 10.3.0.1 255.255.0.0 AUS(config-if)#no shutdown 11. AUS#copyrun start 12. show startup-config 14. Ping would be a good first choice. Show command Exercise 1. Show ip interface brief 2. Show interfaces 3. Show ip route 4. Show running-config 5. Show startup-config 6. The configuration in NVRAM is not lost when the router is rebooted and contains what configuration the router will have when it starts up. The running configuration is contained in RAM and decides what the...

Words: 339 - Pages: 2

Premium Essay

Unit 3 : Week 3 - Homework 6

...Unit 3 : Week 3 - Homework 6 ------------------------------------------------- Top of Form |     | Question 1.1. real property - In English Common Law, real property is any subset of land that has been legally defined and the improvements to it made by human efforts: any buildings, machinery, wells, dams, ponds, mines, canals, roads, various property rights, and so forth.              | Question 2.2. personal property - Personal property is generally considered property that is movable, as opposed to real property or real estate. In common law systems, personal property may also be called chattels or belongings.              | Question 3.3. eminent domain - The power the government has to obtain the property of an individual even without the person's full consent. In most countries, including the U.S., the land owner will be compensated for the land at fair market value. This power allows the government to seize land to be used in public enterprises such as roads, schools, or utilities              | Question 4.4. condemnation - the seizure, as of property, for public use.              | Question 5.5. inverse condemnation - is a term used in the law to describe a situation in which the government takes private property but fails to pay the compensation required by the 5th Amendment of Constitution. In some states the term also includes damaging of property as well as taking it. In order to be compensated, the owner must then sue the government. In such...

Words: 1514 - Pages: 7

Premium Essay

Unit 3 Assignment 1: Homework

...Dr. Davis PT1420 26 June 2014 Unit 3 Assignment 1: Homework 5. Write a pseudo code statement that declares the variable cost so that so that it can hold real numbers. a. declare real cost 6. Write a pseudo code statement that declares the variable total so that it can hold integers. Initialize the variable with value zero. a. Declare real price = 0.00 display “the original price” input items original price display “price” 3. Write assignment statements that perform the following operations with variables a, b and c. a. set b = a+2 b. set a = b*4 c. set b = a/3.14 d. set a= b-8 7. Write a pseudo code statement that assigns the value 27 to the variable count. A count: = 27 8. Write pseudo code statement that assigns the sum of 10 and 14 to the variable total. a. declare integer total set total = 10+14 display total 9. Write a pseudo code statement that subtracts the variable down payment from the variable total and assigns the result for the variable due. a. declare integer down payment declare integer total declare integer due set due = total – down payment display “down payment “ input down payment 10. Write a pseudo code statement that multiplies the variable subtotal by 0.15 and assigns the result to the variable total fee a. declare real subtotal declare real totalfee set totalfee subtotal * 0.15 display “subtotal” input subtotal display totalfee 4. Assume the variable result,...

Words: 550 - Pages: 3

Premium Essay

Unit 3 Political Science Homework

...Marsha McMillen Unit 3 Political Science Homework What Public Opinion is and is not? Public opinion is how a group of people looks at a certain public matter, such as politics. Public opinion is not the opinion of everyone it is just a select amount of people that feel a certain way about political matters. One example of personal opinion would be that I would like the schools, to have more teachers in a single classroom. Public opinion would be directed at putting pray and the pledge of allegiance back in the schools. Several factors shape public opinion. Some are, social class, education, region, religion, these are just a few of the factors. Social class and Education are related, because the more education you have the more money you can make to spend on technology and finance. The wealthier you are will grant you a higher place in society, than the less wealthy. In the United States when you are college educated, you are more tolerant, favor civil rights, and you understand different viewpoints. “But on economic issues, many of them are skeptical of efforts to redistribute income by higher taxes on the upper brackets....

Words: 391 - Pages: 2

Free Essay

Network

...Network Technology and Service Integration Unit 1 Homework The following homework is designed to cover the course objectives for this unit. Assignment 1.1: Textbook/Workbook Assignments • Complete the following exercises and questions from Routers and Routing Basics: CCNA 3 Labs and Study Guide: Vocabulary Exercise: Matching on page 3 VLSM Subnetting a Subnet Exercises on pages 9-11 VLSM Addressing Design Scenarios 1-6 on pages 15-20 Summary Route Exercises on pages 21-24 Concept Questions on pages 25-27 VLSM Case Study on page 27 Internet Research on page 29 (Use the ITT Tech Virtual Library.) • Complete Chapter 9 Review Questions 2-7, 10, 14, 20-22 on pages 258-259 of Introduction to Telecommunications. Submit your written answers to your instructor at the beginning of Unit 2. . Assignment 1.2: Virtual Labs • Complete Virtual Labs 6, 7, and 8 from the CCNA 640-802 CCNA Simulator, which you can find by clicking through these paths: ICND1 Troubleshooting Scenarios Lab 6: IP Addressing and Routing. ICND1 Troubleshooting Scenarios ICND1 Part 4: Troubleshooting Labs Lab 7: IP Routing I ICND 2 Troubleshooting Scenarios Lab 13: IP Routing II Submit your written answers to your instructor at the beginning of Unit 2. ©ITT Educational Services, Inc: Date: 03/13/09 Network Technology and Service Integration Unit 2 Homework The following homework is designed to cover the course objectives for this unit. Assignment 2.1: Textbook/Workbook Assignments • Complete the following exercises...

Words: 2825 - Pages: 12

Free Essay

Dadsa

...Friday, December 13 4:23 PM eschulte account log off PHYS 101 Exams UIUC Instructor Unit 3: Homework / Homework / Homework / Schulte, Elaine Student Homework: Hour Exam 3 Deadline: 100% until Thursday, November 21 at 8:00 AM Problems Print Assignment View Standard Exercise The Mass and The Spring 1 2 3 The Mass and The Spring Standard Exercise The Pendulum Standard Exercise The Hydraulic Lift Standard Exercise Archimedes and the King's Crown Standard Exercise The Garden Hose Standard Exercise The Guitar String A block of mass m = 5 kg is connected to a vertical spring as shown in the diagram. When the mass is at rest, the spring stretches y0 = 5 cm beyond its natural length lspring = 14 cm. Standard Exercise The Intense Speakers 1) For this system, in the vertical configuration, y0 = 5 cm gives the equilibrium position. False True Submit Hide Solution Standard Exercise The Speeding Car Standard Exercise Heating a Metal Strip Solution: This question asks about the effect of gravity on the equilibrium position of a spring. Remember that the effect of a gravitational force is to stretch the spring an amount Δx = mg/k. This stretch in the spring represents an offset in the natural (horizontal) equilibrium position of the spring. While the question is strangely worded, the answer is true, the change in position y0 = 5 cm represents the new equilibrium position. Standard Exercise Compressing...

Words: 3439 - Pages: 14

Free Essay

Acc 560 Week 2 Homework Acc560 Week 2 Homework

...ACC 560 Week 2 Homework ACC560 Week 2 Homework Click below link for Answer http://workbank247.com/q/acc-560-week-2-homework-acc560-week-2-homework/13288 http://workbank247.com/q/acc-560-week-2-homework-acc560-week-2-homework/13288 1) Ikerd Company applies manufacturing overhead to jobs on the basis of machine hours used. Overhead costs are expected to total $300,000 for the year, and machine usage is estimated at 125,000 hours. For the year, $322,000 of overhead costs are incurred and 130,000 hours are used. Instructions (a) Compute the manufacturing overhead rate for the year. (b) What is the amount of under-or overapplied overhead at December 31? (c) Prepare the adjusting entry to assign the under-or overapplied overhead for the year to cost of goods sold. 2) Crawford Corporation incurred the following transactions. 1. Purchased raw materials on account $46,300. 2. Raw materials of $36,000 were requisitioned to the factory. An analysis of the materials requisition slips indicated that $6,800 was classified as indirect materials. 3. Factory labor costs incurred were $59,900, of which $51,000 pertained to factory wages payable and $8,900 pertained to employer payroll taxes payable. 4. Time tickets indicated that $54,000 was direct labor and $5,900 was indirect labor. 5. Manufacturing overhead costs incurred on account were $80,500. 6. Depreciation on the company’s office building was $8,100. 7. Manufacturing overhead was applied at the rate of 150% of...

Words: 1242 - Pages: 5

Premium Essay

Micrpeconomics

...BCO 116 Elementary Calculus 2Ch, 3 ECTS Academic Year 2015-2016 Course Description This course is an introduction to calculus and is intended to familiarize students with the mathematical thinking. It focuses on topics of calculus that are relevant to students in the managerial and business sciences. The main goals of the course are to develop technical skills allowing the analysis of real life problems, to provide the tools necessary to formulate, analyse and implement a simple quantitative model to support a business decision, and to understand articles and books on business analysis Starting with preliminaries to calculus, and limits, we follow with derivatives and its applications to real life problems, and integration. This course covers also functions with more than one variable, differential equations, and optimization. Basic requirement. Students must have a good background on algebra and arithmetic, as well as a good understanding of mathematical functions and their applications to practical problems. Course Objectives * To builds skills and proficiency in methods of calculus * To understand concepts, formulas and techniques of calculus through exercises and applied examples * To be able to translate real-world problems to mathematical language and models * To acquire ease in identifying the different kind of problem and the appropriated rule to solve it * To interpret results of calculus * To apply analytical methods of calculus...

Words: 1257 - Pages: 6

Premium Essay

Sylubus

...ANTHROPOLOGY 101 Introduction to Cultural Anthropology Queens College / CUNY, Spring 2015 TuTh 12:15-1:30PM, Kiely 150 Professor: Ramona Lee Pérez, PhD Email: ramona.perez@qc.cuny.edu Office hours: Th 2-3 PM, PH 315H COURSE DESCRIPTION This course is an introduction to the range of human diversity through an exploration of the peoples of the world. We will cover the basic concepts, theories, and methods that anthropologists use to study variations in cultural norms and social practices, economic systems and rules of law, social organization and patterns of inequality, identity and worldview, and patterns of social and cultural change. Focusing on the culture concept and the method of ethnography, we begin with the historical foundations of anthropology and then follow its attempts to understand contemporary human cultures. Comparative analysis of multiple ethnographic case studies and major theoretical approaches illuminates the range of human diversity, the forces that shape cultures, and how people adapt to a rapidly changing modern world. The central objectives of this course are to develop your intellectual skills, your cross-cultural fluency, and your sense of civic and moral engagement in global society. I hope that this course inspires many of you to become anthropology majors or minors, and grants each of you an anthropological perspective on your own life. REQUIREMENTS This is an intensive course that requires full participation from every student...

Words: 9454 - Pages: 38

Premium Essay

Diversity

...South-Western Cengage Learning, 2010; ISBN-13: 978-0-538-47808-3 Course Outline: Introduction Unit 1: Chapters 1, 4, 5 Chapter 1 – Exploring the World of Business and Economics Chapter 4 – Choosing a Form of Business Ownership Chapter 5 – Small Business, Entrepreneurship, and Franchises Unit Exam Unit 2: Chapters 9, 10, 11, 6, 7 Chapter 9 – Attracting and Retaining the Best Employees Chapter 10 – Motivating and Satisfying Employees and Teams Chapter 11 – Enhancing Union-Management Relations Chapter 6 – Understanding the Management Process Chapter 7 – Creating a Flexible Organization Unit Exam Unit 3: Chapters 12, 13, 14, 15 Chapter 12 – Building Customer Relationships Through Effective Marketing Chapter 13 – Creating and Pricing Products that Satisfy Customers Chapter 14 – Wholesaling, Retailing, and Physical Distribution Chapter 15 – Developing Integrated Marketing Communications Unit Exam Unit 4: Chapters 2, 18, 20, 3 Chapter 2 – Being Ethical and Socially Responsible Chapter 18 – Understanding Money, Banking, and Credit Chapter 20 – Understanding Personal Finances and Investments Chapter 3 – Exploring Global Business Unit Exam Final Exam (cumulative) Your final grade will be based on: Four Unit Exams 40% (10% each unit exam) Final Exam 20% Case Study 10% Questions of the Day 20% Homework and class participation 10% Grades: A=94-100 A-=90-93...

Words: 1187 - Pages: 5

Free Essay

Policy Definition & Data Classification

...8/1/2015 NT2580 Unit 7 Policy Definition and Data Classification Standard : NT 2580 : ITT Tech : Homework   NT2580 Unit 7 Policy Definition and Data Classification Standard Home  ITT Tech  NT  NT 2580  NT2580 Unit 7 Policy Definition and Data Classification Standard  You have successfully unlocked this document. You have 24 more unlocks  available. Was this document helpful?  Yes   Download Document https://www.coursehero.com/file/11610135/NT2580­Unit­7­Policy­Definition­and­Data­Classification­Standard/?timestamp=20150801105100 1/6 8/1/2015 NT2580 Unit 7 Policy Definition and Data Classification Standard : NT 2580 : ITT Tech : Homework Share and earn access  CorporalStarViper9176 ITT Tech Follow 3  1787  302 https://www.coursehero.com/file/11610135/NT2580­Unit­7­Policy­Definition­and­Data­Classification­Standard/?timestamp=20150801105100 2/6 8/1/2015 NT2580 Unit 7 Policy Definition and Data Classification Standard : NT 2580 : ITT Tech : Homework   VIEWS UNLOCKS 0 1   HELPFUL UNHELPFUL 0 0 About this Document SCHOOL ITT Tech COURSE NT 2580, Summer 2014 COURSE TITLE Introduction to Information Security PROFESSOR MR J TYPE Homework PAGES 1 WORD COUNT 206 Is this correct?  Flag Get Help in NT 2580 https://www.coursehero.com/file/11610135/NT2580­Unit­7­Policy­Definition­and­Data­Classification­Standard/?timestamp=20150801105100 ...

Words: 487 - Pages: 2

Free Essay

Asdfasfawewrwre

...Syllabus MAT 102 Intermediate Algebra 3 credit hours 3 contact hours (3 lecture hours) Catalog Description This course includes the study of linear systems and applications; quadratic expressions, equations, functions and graphs; and rational and radical expressions and functions. Prerequisite MAT 101 or MAT 152 (C or higher) or appropriate placement score What will I learn? At the end of this course, you should be able to: 1. Simplify an algebraic expression involving exponents, radicals, or fractions. 2. Solve equations and formulas of first and second degree, and first-degree inequalities, for an indicated unknown or variable. 3. Graph a linear function and identify its slope and intercepts. 4. Graph a quadratic function and identify its vertex and intercepts. Textbook and Required Materials The custom edition of Elementary and Intermediate Algebra, 4th edition by Tom Carson and Bill Jordan packaged with access to MyLabsPlus, available in the TTC Bookstore and a TI-83 or TI-84 calculator MyLabsPlus Departmental Homework Policy Students must complete each section of homework within a unit in MyLabsPlus with a score of 90% or better (on each section, NOT a unit average) in order to receive a grade for the unit exam. Homework mastery must be completed before the unit exam is given and by the deadline stated by your instructor. Each section of homework is open for the entire unit, and each individual problem has unlimited...

Words: 1197 - Pages: 5

Free Essay

The Joys of Cheating

...a program called Pupil Path, www.Pupilpath.com Your child will receive the instructions and passwords for this within the first week of school. • Class participation –Class participation covers every aspect of a student’s behavior in the classroom. This includes the questions you ask, the comments you make, the notes you take, completion of class work, notebook check, presenting your reference tables and your prompt arrival to class. Students are expected to remain on task while in class and are accountable for their conduct. Class participation is 20% of your grade • Homework – Homework assignments must include the student’s name, period, date and the HW#. Every problem assigned must be attempted. Homework must be neat and submitted on a standard loose leaf paper. Sloppy homework will earn no credit. In addition, students must show all their work. You may also submit your homework electronically by sending it as an attachment to the following email:...

Words: 1313 - Pages: 6

Premium Essay

Acc 560 Course Extraordinary Success/ Tutorialrank.Com

...ACC 560 Week 1 Homework Chapter 1 (E1-5, E1-9, E1-10 and E1-2A) For more course tutorials visit www.tutorialrank.com ACC 560 Week 1 Homework Chapter 1 (E1-5, E1-9, E1-10 and E1-2A) E1-5 E1-5 Gala Company is a manufacturer of laptop computers. Various costs and expenses associated with its operations are as follows. 1. Property taxes on the factory building. 2. Production superintendents’ salaries. 3. Memory boards and chips used in assembling computers. 4. Depreciation on the factory equipment. 5. Salaries for assembly-line quality control inspectors. 6. Sales commissions paid to sell laptop computers. 7. Electrical components used in assembling computers. 8. Wages of workers assembling laptop computers. 9. Soldering materials used on factory assembly lines. 10. Salaries for the night security guards for the factory building. The company intends to classify these costs and expenses into the following categories: (a) Direct materials, (b) Direct labor, (c) Manufacturing overhead, (d) Period costs. List the items (1) through (10). For each item, indicate the cost category to which it belongs. E1-9 E1-9 An incomplete cost of goods manufactured schedule is presented below. Complete the cost of goods manufactured schedule for Hobbit Company. E1-10 E1-10 Manufacturing cost data for Copa Company arc presented below. Case A Case B Case C Direct materials used $ (a) $68,400 $130,000 Direct labor ...

Words: 10591 - Pages: 43

Premium Essay

Its Making Put Something Here

...PT1420 Introduction to Programming Week-2 Lesson Plan TUE 6:00 PM to 10:30 PM Instructor: Tushar Patel (tspatel02@yahoo.com, tpatel@itt-tech.edu) CLASS: Topic: Unit 2: Software Program Design I Course Objectives Covered by This Unit CO2: Design programs by using flowcharts and pseudo code. CO3: Write programs that perform input, processing, and output. Unit Learning Outcomes LO8: Determine program input, processing, and output stages. LO9: Create the necessary flowcharts to describe a program’s structure. LO10: Use pseudocode to define a program’s structure. LO11: Formulate solution algorithms for calculations by properly following the order of operations. Key Concepts ▪ Determining input, process, and output ▪ Creating flowcharts and pseudocode ▪ Formulating algorithms Reading ▪ Gaddis, Chapter 2: “Introduction to Computers and Programming,” pages 29-55 Resources: • Data Projector • ITT Virtual Library • Text Books • Visual Studio • Lab Computers • Student Removable Hard Drive • VM Ware Player Methods: • Lecture • Group Discussion • Lab Work • Review exercise / Research Papers • Quiz Brief Lesson Overview: Today’s lecture we would be discussing the following topics. • Discuss how all programs basically consist of a three-step process: input, process, and output. Use the payroll calculation program...

Words: 895 - Pages: 4