# UNIT 2

Satisfactory Essays
470 Words
Grammar
Plagiarism
Writing
Score
UNIT 2
PT1420 - Unit 2 Homework and Lab Assignment

Unit 2 Assignment 1: Homework (material from Chapter 2of your text book)
1.) What is pseudocode? An informal language used to develop a programs design
2.) Computer programs typically perform what 3 steps. Input, Processing, and Output
3.) What 2 things must you normally specify in a variable declaration.
Variable name and data type
4.) Write assignment statements that perform the following operations with the variables a, b, and c:
a. Adds 2 to a and stores the result in b b=a+2
b. Multiples b times 4 and stores the result in a a=bx4
c. Divides a by 3.14 and stores the result in b b=a/3.14
d. Subtracts 8 from b and stores the result in a a=b-8
5.) Write the pseudocode for a program that will determine the average miles per gallon a car gets. (Inputs should be miles driven and gallons of gas used)
Miles driven= Distance
Gallons of gas used=Gas

*****************************************************************

Unit 2 Labs

Problem:

Write a program that will calculate the cost of installing fiber optic cable at a cost of .87 per foot for a company. Your program should display the company name, number of feet installed, and the total cost for the installation.

1.) 2.1: Pseudocode
Type in your answers below where the question marks are shown based on the above problem

Variable Table

Purpose of Variable
Variable Name
Stores the cost of fiber fiberCost Stores the company name compName Stores number of feet to be installed feet Stores calculated cost of installed fiber
Totalcost

Pseudocode:

Display “Welcome to the Fiber Optic Calculator Program”
Set fiberCost = fibercost
Display “What is the Company Name?”
Input compName
Display “How many feet of fiber will be installed?”
Input feet
Set feet * fiberCost
Display “Company Name: “,("company name: " & compName)
Display“Feet of cable installed: (" total feet installed: " & feet)
Display “Total cost: \$”, ("total cost is: \$" & totalcost)

2.) 2.2: Flowchart.
Use

## You May Also Find These Documents Helpful

• Satisfactory Essays

5. Write a pseudocode statement that declares the variable cost so it can hold real numbers.…

• 1062 Words
• 8 Pages
Satisfactory Essays
• Satisfactory Essays

5.) Write the pseudocode for a program that will determine the average miles per gallon a car gets. (Inputs should be miles driven and gallons of gas used)…

• 453 Words
• 3 Pages
Satisfactory Essays
• Satisfactory Essays

One disadvantage of Ratios is tools of quantitative analysis, which ignore qualitative points of view. For example the stock turn over ration and Asset turnover only look at the quantity and not if the quality of the product is up to standard.…

• 306 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Create an expanded mapping similar to figure 1-3 for the binary number 11100010 using either paper and pencil or a word document.…

• 1660 Words
• 7 Pages
Satisfactory Essays
• Satisfactory Essays

1. What is a pinhole camera? How do we know that these devices existed before the nineteenth century?…

• 307 Words
• 1 Page
Satisfactory Essays
• Satisfactory Essays

10 : Chemical systems that absorb excess acids or bases maintaining a relatively stable pH…

• 1472 Words
• 6 Pages
Satisfactory Essays
• Satisfactory Essays

6. Write a pseudocode statement that declares the variable total so it can hold real integers. Initialize the variable with the value 0.…

• 313 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Match the activity or purpose on the left with the appropriate description on the right by typing in the corresponding letter under the Answer column.…

• 264 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

Not in my own words but The four parts would be the Discovery-Time, Exploit-Time, Disclosure-Time, and Patch-Time. All four of these must be looked at and evaluated.…

• 257 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

2. What type of recording do you think would be the most useful to crime…

• 579 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

• 564 Words
• 3 Pages
Satisfactory Essays
• Good Essays

‘Abandoned’ ‘blind’ ‘darkness’ ‘challenges’ ‘overwhelmed’. These five words are the best words in both of these extracts do describe what is happening in both texts. The first noticeable thing in both extracts Blood River from page 216 to 218 and heart of darkness 48- 50, is the link of the theme of danger to the settings being used in both texts. Evidence of this is in heart of darkness when the text says” the night came suddenly and stuck you blind” ‘it seemed unnatural” ‘ a white fog, very warm and clammy, more blinding than the night’, ‘very loud cry, as of indefinite desolation’. In contrast blood river also says ‘ the Congo’ ‘flicker of lightening’ ‘angry looking clouds’ ‘limbs all folded together for warmth like the blades on a Swiss army knife’. So the instant direction of attention is to the settings of both of these texts, both characters were in dangerous situations faced with challenges that were overwhelming.…

• 995 Words
• 4 Pages
Good Essays
• Good Essays

Free software is software that users have the freedom to distribute and change. The three main characteristics of free software are: The source code has to be distributed with the program, you cannot restrict people from redistributing/modifying/using the software, and users must be allowed to redistribute modified versions under the same terms/licensing.…

• 641 Words
• 2 Pages
Good Essays
• Satisfactory Essays

Compare and Contrast the Economic, Social, and Political development of New England and the Chesapeake Bay Colonies.…

• 316 Words
• 2 Pages
Satisfactory Essays
• Satisfactory Essays

For each of the following problems, use the top-down modular approach when writing the pseudocode to design a suitable program to solve each problem. Be sure to include an “analysis” for each problem. Note: you…

• 980 Words
• 5 Pages
Satisfactory Essays