3-3 ppsuedo code

.docx

School

Southern New Hampshire University *

*We aren’t endorsed by this school

Course

140 (20EW5

Subject

Computer Science

Date

Apr 3, 2024

Type

docx

Pages

3

Uploaded by SargentOkapi3461

1 3-3 Assignment: Introduction to Pseudocode and Flowcharts What input does the computer need? The computer needs to know what input to place and where or how to put input or plug numbers or information into the program. I denoted ‘hours’ as my information going into my program representing the number of hours worked up to 40 hours. I placed ‘over_time’ as the hours equal to 41 but under 60. The other information that will be
2 needed is what to do with all the information being given. For this assignment, we have hours and rates. We need to designate any rules about the information given. I made a flow chart with yes or no answers. If the information is ‘yes’ then there are instructions for what the program needs to do with the information. If the information comes back with a ‘no’ then there are instructions on what to do with that information. If there are instances where the computer is not given the correct instructions the program will not work. What steps does the program need to follow to process the input? What output should result? We need if/elif and else statements for this scenario for the program to come out with the correct solution. Also, when typing in the numbers make sure that the order of operations has been placed correctly. If not, the math will not come out correctly and whoever's check is affected will be upset or very happy. When might you need to use decision branching? If you used decision branching, did you account for all possible input values? Branching is used to make the decision about whether the code is true or false and what to do about the information to receive the outcome needed. I places and else statement in order to calculate what needed to be calculated but to just leave off the remainder hours. There was noting denoting what to do with hours over 61 so I just made the statement calculate all the hours that were available.
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help