Preview

Nt1330 Unit 2 Assignment 1

Satisfactory Essays
Open Document
Open Document
3740 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Nt1330 Unit 2 Assignment 1
Declare hours as integer
Declare number as integer
Declare response as character
Repeat
Set hour = 0 Write “This program can calculate your total hours worked” Write “Enter the number of hours worked on Monday:” Write “Enter 0 when you are done” Input number While number != 0 Set hours = hours + number Write “Enter your hours for the next day or 0 if you are done:” Input number End While Write “Your total hours worked are” + hours Write “Add more hours? (Y or N)” Input response
Until response == “N”

1. A while loop will not execute the body of the code if you have your test condition incorrect.
2. If the test data is true then the body runs once: Declare
…show more content…
(Y or N)” Input response
Until response == “N”

1. A while loop will not execute the body of the code if you have your test condition incorrect.
2. If the test data is true then the body runs once: Declare hours As Integer Set hours = 39 While hours < 39 Write hours Set hours = hours + 1
The code can run only once, because the body can be true once.

3. If you begin your loop with “While True” it will not terminate.

Declare hours as integer
Declare number as integer
Declare response as character
Repeat
Set hour = 0 Write “This program can calculate your total hours worked” Write “Enter the number of hours worked on Monday:” Write “Enter 0 when you are done” Input number While number != 0 Set hours = hours + number Write “Enter your hours for the next day or 0 if you are done:” Input number End While Write “Your total hours worked are” +

You May Also Find These Documents Helpful

  • Good Essays

    NT1310 Unit 1 Assignment 1

    • 4837 Words
    • 20 Pages

    In order to get some statistical data about the number of formula 1 crashes and their causes, we randomly picked up 1 race from each year starting from 1960 up till 2013, then extrapolated results to the respective entire year, and then calculated average numbers. Based on those figures we compiled the table below.…

    • 4837 Words
    • 20 Pages
    Good Essays
  • Satisfactory Essays

    I think that the organizations requirements for user's passwords to be several character long and have a certain amount of attempts is actually a great security measure. Yes, i think the additional security is worth it. I also think the number of security entry should be limited. The reason I agree with both is because if they were not in place it woud give people an easier chance of unlocking you phone and disappearing with it. For example, I have an Iphone i went to a friends get together. I place my phone down for 5 minute to get a drink someone took my phone and was trying to unlock it. The person could not get my code correct so my phone shut him out completely. I was happy because my information was protected.…

    • 413 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    IP Array

    • 644 Words
    • 5 Pages

    In the space provided below, copy and paste your IP_Array.vbs Program Code. If it doesn’t…

    • 644 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    o Give a set of test values that test the abnormal operation of this program segment. Test values that would have an abnormal operation on this program segment has to be -1, and 101 because it goes above and below the actual algorithm.…

    • 387 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    How Oracle Works

    • 354 Words
    • 2 Pages

    1. Throughout this entire procedure, the other background processes run, watching for conditions that require…

    • 354 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    Software Testing

    • 1869 Words
    • 8 Pages

    procedures on approved test cases [1]. Furthermore, the software testing is defined in [2] as "the dynamic verification of the behavior of a program on a finite set of test cases, suitably selected from the usually infinite executions domain, against the expected behavior". However, the software testing process can be assisted with software tools to make it automated. In…

    • 1869 Words
    • 8 Pages
    Powerful Essays
  • Powerful Essays

    Thus a program has been written in the UNIX successfully to find the biggest of three numbers and the output is verified.…

    • 1221 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    The main purpose for performing testing stage is to discover defects or the negative shade by testing each and every individual program components. Further, these components can be functions, objects or modules. On the due course of system testing, these components are fused together to create a complete system. At this level of stage, testing should preliminarily focus on establishing and even by showing that the system reaches its target of its functional requirements, and contrarily should not behave in an way not imagined or assumed. Test data are inputs which have been devised to test the system whereas test cases are inputs to test the system and the outputs are predicted from these inputs if the system operates according to its specification.…

    • 2709 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    5. Test: Test whether the end condition is satisfied. else stop. If not, return in current population and go to Step 2.…

    • 2736 Words
    • 11 Pages
    Powerful Essays
  • Powerful Essays

    5. Test the program • To ensure the program runs correctly and is error free. • Sample data need to be prepared. It includes…

    • 1266 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    For Loop

    • 534 Words
    • 3 Pages

    The condition to test is between the round brackets. We want to keep looping while the variable called loopVal is less than 5. Inside of the curly brackets our code first prints out a line of text. Then we need to increment the loopVal variable. If we don't we'll have an infinite loop, as there is no way for loopVal to get beyond its initial value of 0.…

    • 534 Words
    • 3 Pages
    Good Essays
  • Good Essays

    SE 1

    • 1514 Words
    • 6 Pages

    Testing begins when coding is done. While performing testing the major focus is on logical internals of the software. The testing ensures execution of all the paths, functional behaviours. The purpose of testing is to uncover errors, fix the bugs and meet the customer requirements.…

    • 1514 Words
    • 6 Pages
    Good Essays
  • Powerful Essays

    2. The output must be displayed using a message box. It will ask you if you want to try again. If yes , the textbox must be cleared the new input and if not the program will just simply end…

    • 1102 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    In the while loop, the body of the loop is executed as long as the expression is true. And when the expression become false, program control passes to the line that follows the loop.…

    • 295 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Daily Time Record

    • 1204 Words
    • 5 Pages

    CHED’s Center of Development in IT EducaOur supervisor give our corresut our task in the company one by one.ports of their emtion…

    • 1204 Words
    • 5 Pages
    Satisfactory Essays