Preview

Homework Unit 3

Satisfactory Essays
Open Document
Open Document
354 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Homework Unit 3
PT1420
Unit 3 Homework

Pg. 71

5. Module inputName () Declare string name Display"Enter Name:" End Module
6. In passing argument by value- any changes made to the parameter value won't affect argument outside module. In passing argument by reference- Changes will affect actual argument passed to module.

Algorithm

3. Header- Module myModule (Integer a, integer b, integer c)
Call statement - Call myModule (3,2,1)
A contains 3, B contains 2, and C contains 1

4. Display "Here are the values:" Display arg1, " ", arg2 " " , arg3
End Module

Declare Interger age
Declare Real income
Declare String name

Call Statement- Call display ( age, income, name)

5. Module getNumber (Integer Ref value)

Display "Input number:" Input value
End module

6. Module mail () Declare Integer x=1 Declare Real y=3.4 Display x " " , y Call changeUs (x,y) Display x, " ", y end module

Module changeUs ( Integer a , Real b) set a=0 set b=0 Display a, " ", b end module

PT1420
Unit 4

Pg. 111

1. Statements are execute in order according to the program code. Complex programs can need the help of a decision structure. Statements have to be true to be executed.

2. Duel Decision Structure- Tests a condition and executed if true.

3. Multiple alternative decision structure- Tests the value of a variable to determine which statements to execute.

4. AND operator- combines more than one condition in a program. Makes a compunf Boolean operation.

5. OR operator- Creates an expression that is true when with of the expressions are true.

6. And operator - If the number is not within the range then it comes back false.

7. Flag- a variable that tells when some condition exists in the program.

Algorithm

1. Get x value If x is greater than 100, assign 20 to the variable y and assigns 40 to the variable z
5. Get the amount1 value Get the amount2 value. If the amount1 is greater than 10 and amount2 is

You May Also Find These Documents Helpful

  • Satisfactory Essays

    PT1420 Chapter 3 Review

    • 1062 Words
    • 8 Pages

    7. because it could be a variable conflict, the global variables are inherited throughout the whole program, so it very well could conflict with others…

    • 1062 Words
    • 8 Pages
    Satisfactory Essays
  • Satisfactory Essays

    There is nothing wrong with this discussion question response. Accordingly, I awarded the author a score of 10. Each paragraph is written to explain each operator. Clearly, this is good writing. Each paragraph uses vocabulary from the reading material, and gives insight into the operation of each operator. This response explains the unary operator “++” is used for adding one to a variable, the conditional-and-operator “&&” is used between testing expressions, the inequality operator ”!=” is used to rule out a possible value, and the “%=” operator is used to return the remainder of a division operation( to the variable to the left of this assignment operator ). Thank…

    • 110 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    SD1230 Lab 1

    • 239 Words
    • 2 Pages

    2. What type of instruction is used to execute different code based on a condition? -Jumps…

    • 239 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Cis 207 Week 2/3 Quiz

    • 383 Words
    • 2 Pages

    * C. Follows the instructions as they appear in the program, whether they are right or wrong…

    • 383 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 7 Assignment 1

    • 261 Words
    • 2 Pages

    2. A pretest loop is a loop tests the conditions before performing the iteration. A posttest loop performs the iteration then test the condition.…

    • 261 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    PT1420 Unit 3 Labs

    • 270 Words
    • 2 Pages

    The Network Systems Administration degree is awarded after 90 credits and Nolan Owen has 70 left to take before graduation.…

    • 270 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 Assignment

    • 1058 Words
    • 5 Pages

    A condition-controlled loop uses a true/false condition to control the number of times that it repeats…

    • 1058 Words
    • 5 Pages
    Satisfactory Essays
  • Good Essays

    5. From <, ≤, =, >, ≥, ≠, choose all the symbols that make the statement: 25 - 5 __ 14 + 3 true.…

    • 1433 Words
    • 13 Pages
    Good Essays
  • Good Essays

    Chapter 5 Quiz

    • 334 Words
    • 5 Pages

    TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false.…

    • 334 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    unit 3 homework

    • 254 Words
    • 1 Page

    Connected to a JetDirect print server with an IP of 172.20.20.76 Accessible to all users…

    • 254 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    Unit 4 Homework

    • 401 Words
    • 2 Pages

    What is the difference between passing an argument by value and passing it by reference? By Value means that only a copy of the argument’s value is passed into the parameter variable. Passing by Reference means that the argument is passed into a special type of parameter.…

    • 401 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    4. Assume the variables result, w,x, y, and z are all integers, and that w= 5, x= 4, y=8 and z=2. What will the values be stored in result in each of the following statements?…

    • 748 Words
    • 3 Pages
    Powerful Essays
  • Good Essays

    Compter Science

    • 819 Words
    • 4 Pages

    truth table construction, subexpression construction using AND and NOT gates, subexpression combination using OR gates, circuit diagram production…

    • 819 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Determine whether each statement is true or false and write your answer in the “True of False” column…

    • 519 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Criminal Justice

    • 636 Words
    • 3 Pages

    TRUE/FALSE. Write 'T' if the statement is true and 'F' if the statement is false.…

    • 636 Words
    • 3 Pages
    Satisfactory Essays