Preview

UNIT 2

Satisfactory Essays
Open Document
Open Document
470 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
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

  • Good Essays

    unit 1

    • 367 Words
    • 2 Pages

    1. Identify four main points that would be included in a contract of employment. If possible, use an example contract to support your answer (feel free to obscure any confidential information).…

    • 367 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    PT1420 Chapter 3 Review

    • 1062 Words
    • 8 Pages

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

    • 1062 Words
    • 8 Pages
    Satisfactory Essays
  • Satisfactory Essays

    unit 3

    • 310 Words
    • 2 Pages

    Based on the information presented in the scenario/case study discuss Albatross Anchor’s competitiveness in relation to (please address all items in the below list and provide support for your conclusions):…

    • 310 Words
    • 2 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

    Unit 2 D2

    • 306 Words
    • 2 Pages

    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

    Unit 1

    • 1660 Words
    • 7 Pages

    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

    Unit Two

    • 307 Words
    • 1 Page

    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

    unit 3

    • 1472 Words
    • 6 Pages

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

    • 1472 Words
    • 6 Pages
    Satisfactory Essays
  • Satisfactory Essays

    IT 210 appendix d

    • 264 Words
    • 2 Pages

    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
  • Good Essays

    Unit2

    • 995 Words
    • 4 Pages

    ‘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
  • Satisfactory Essays

    Unit Two

    • 579 Words
    • 2 Pages

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

    • 579 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 2 D1

    • 564 Words
    • 3 Pages

    Having security based software, clean-up based software, and drive formatting can dramatically change how well you computer performs. Security based utilities such firewalls are highly important as your computer is at risk all the time. The main risks to your computer are from virus, Trojans, worms, cookies, spyware and many more. These can be sent though free software downloads emails, internet websites, bad cookies, and many different places. Unwanted virus can cause data loss, makes changes or delete software packages, saves personal information and send it to other users. Firewall will prevent unwanted unauthorized users from accessing your computer. Malware packages can go though cookies and delete bad cookies containing bank details and other personal information. You can also buy security packages such as Norton and MacAfee whereas the firewall is a package that comes with the operating system. I would advise to use the computer based and the shop brought packages to protect your computer. Without uses packages and if the packages aren’t running you computer could be at risk. You computer will run slower, freeze, or even stop running completely if it gets infected.…

    • 564 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Unit 3

    • 4205 Words
    • 17 Pages

    Please note that this Assessment document has 5 pages and is made up of 4 Sections.…

    • 4205 Words
    • 17 Pages
    Good Essays
  • Good Essays

    unit 1

    • 641 Words
    • 2 Pages

    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

    programming problem

    • 980 Words
    • 5 Pages

    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