Preview

Checkpoint 2

Satisfactory Essays
Open Document
Open Document
294 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Checkpoint 2
CheckPoint Chapter 2 Programming Problem

The manager of the Supermarket would like to be able to compute the unit price for the product sold here. To do this, the program should input the name and price of an item and its weight in pounds and ounces.

Analysis
Process:
1. Display the program title.
2. Prompt for item name.
3. Prompt for the price of item.
4. Prompt for weight of item in pounds.
5. Prompt for weight of item in ounces.
6. Convert pounds to ounces then add it to ounces.
7. Divides price by total ounces.
8. Display price per ounce.
Input:
Item name (String: Item Name)
Item price (Real: Price)
Item weight in pounds (Integer: Pounds)
Item weight in ounces (Integer: Ounces)
Output:
Unit price (Real: Unit Price)
Main Module:
Declare Item name as String
Declare Item price as real
Declare Item weight lb. as real
Declare Item weight oz. as real
Declare unit price as real
Write “Welcome User”
Write “This program computes and item’s unit price (price per ounce).”
Call Input Data Module
Call Perform Calculations Module
Call Output Results Module
End program
End Main Module
Input Data Module
Write “What is the item’s name?”
Input Items name
Write “You will now enter the item’s weight (two steps)
Write “How many pounds does the item weigh (excluding ounces over the nearest pound)?”
Input Item weight lb.
Write “Now how many ounces?”
Input Item weight in oz.
End Input Data Module
Perform Calculations Module
Declare Total oz. as real
Set Total oz. = 16+ pounds + ounces
Set Unit Price= Pounds Price/16
Total Price= pound price*(pounds + ounces/16
End Perform Calculations Module
Output Results Module
Write “Item is: Item Name”
Write “Total price of item is”: Item price
Write “The price per ounce is”: Unit Price
End Output Results Module

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Capstone Checkpoint

    • 270 Words
    • 2 Pages

    I believe that it is essential for security professionals to be well familiar with their surroundings and have great knowledge of their primary targets, while roaming their environment. It is critical that all security professionals must maintain full control of the environment they are assigned to, and are aware of not leaving a vulnerable gap to the criminals. These security professionals must be ready to notice the slight changes of the environment, and must keep in mind that all areas are different. Therefore, they must plot a defense mechanism based on the type of environment they are assigned to.…

    • 270 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    It 210 Checkpoint

    • 374 Words
    • 2 Pages

    In one of the week 3 discussion questions we discussed the algorithm that would be required to make a peanut butter sandwich. In this CheckPoint you will need to take that one step further and create a program design to make a peanut butter sandwiches. Below you will find a partial program design; you need to complete it by adding the pseudocode in the required areas. You need to add one repetition (loop) control structure and one decision control to complete the program design. The user will decide how many sandwiches are made; this is where the loop will be used. The user will decide if the sandwich includes jelly, and, if it does, what flavor of jelly; to keep it simple we are only allowing grape or strawberry jelly.…

    • 374 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Pt1420 week 2

    • 320 Words
    • 3 Pages

    1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height.…

    • 320 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CEIS100 W5 ILab Report

    • 320 Words
    • 2 Pages

    Code—copy and paste (or type) your code below. You can also post a screenshot of the program working if you would like.…

    • 320 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    | On the Toppings worksheet, in cell B5, insert a function that will calculate the average retail price of the available toppings (D15:D29).…

    • 566 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    The differences between analog and digital can be described as the differences between interlaced and progressive scan on an LCD or plasma TV. I remembered purchasing my very first flat-screen, a generic-branded 42” plasma TV from an online outlet about 2 years ago that had 1080i (interlaced) scan and an HDMI input. I did not do an overwhelming amount of research on the technology at the time prior to purchasing the TV, because at $650 plus shipping, it seemed too good of a deal to pass up, especially for a plasma TV that also had 1080. After about 6-7 months later, the term “you get what you paid for” comes to mind. The screen had become gooey green for some reason and the majority of the time made the TV completely unwatchable. Although this story about my purchase has nothing to do with comparing the differences between interlaced or progressive scan, I did my homework afterwards to ensure that my next purchase would be 100% compatible with my video games that supported up to 1080p.…

    • 328 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

    Cost Control Problem Set

    • 689 Words
    • 3 Pages

    Menu item |Number sold |Standard/budgeted portion cost | |A |580 |$4.45 | |B |285 |$6.20 | |C |600 |$4.15 | |D |200 |$6.00 | |E |475 |$5.95 | |F |320 |$7.05 | |G |545 |$6.10 | |H |200 |$6.95 | |Totals |3,205 | | | | | | |Solve all problems for 2 decimal places (x.xx) | | | |Food sales |$57,680.30 | | | | | | |1. Food cost $ based on standard cost figures |$17834.75 |(1 pt) | | | | | |2. Food cost % based on standard cost figures |30.92% |(1 pt) | | | | | |3. Contribution margin $ |$39845.55 |(1 pt) | | | | | |Actual inventory figures | | | |Opening inventory |$6,415.60 | | |Purchases |$19,950.30 | | |Ending inventory |$6,852.65 | | | | | | |4. Cost of goods sold $ |$19513.25 |(1 pt) | | | | | | | | | |5. Food cost % based on actual cost figures |33.83% |(1 pt) | | | | | | | | | |6. Difference between standard and actual cost in $ |+1678.5 |(1 pt) + or | | | | | |7. Difference between standard and actual cost % |+2.91% |(1 pt) + or | |…

    • 689 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Checkpoint3

    • 264 Words
    • 2 Pages

    • Write a response in which you determine a diagnosis code category for the following case studies, and explain the rationale for your selections:…

    • 264 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    ops335 lab 2 firewall

    • 695 Words
    • 4 Pages

    6. Display the tax payable and total purchase price for the book to the customer.(tax + list price = purchase price)- data type decimal…

    • 695 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Psy 220 Checkpoint

    • 331 Words
    • 2 Pages

    Choose one close relationship in your life; it does not have to be a romantic love relationship.…

    • 331 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Psy 265/ Checkpoint

    • 321 Words
    • 2 Pages

    Using principles in critical thinking when it comes to sexual decision is very important. I grew up in a house hold where my parents had only been with each other, and they have been together since they were 13 years of age. Growing up this is what I always went by. You have to use critical thinking when it comes to these types of decisions because you do not know want to make a choice that will haunt you for the rest of your life, you want to have a clear mind about it looking back and knowing you did not make a mistake. When I met my husband, there were a lot of things we talked about before we had sex, the history of our past, the precautions we were going to take and what would happen next. I want to know that if we were going to be getting intimate with each other I wanted it to last, because we was not married. Using critical thinking and these steps that people use may seems little ridiculous to a lot of people, but there are so many diseases, such as STDs and so many things that sex links to. I think that if you are using critical thinking then you will not make any type of mistake when it comes to sex. In these days and time they do not think about what they are doing and that is why so many young people have STD, AIDS and/or are pregnant. I believe that children should be raised to use their critical thinking when it comes to a life changing event, such as sex. It is something that could change your life completely, more then what anyone else thinks. You want to know that you are making the right decisions when you about thinking about having sex for the first time, or even having sex with a new…

    • 321 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Currency Conversion Test

    • 737 Words
    • 6 Pages

    If Option 4 Write "Thank you for using the Currency Conversion. Have a nice day."…

    • 737 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    A P Chater 2 Checkpoint

    • 450 Words
    • 2 Pages

    5. Which kind of bond holds atoms in a water molecule together? What attracts water molecules to one another?…

    • 450 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    TDA 2

    • 760 Words
    • 3 Pages

    3.4 Describe the sorts of problems that might occur when supporting learning activities and how to deal with these…

    • 760 Words
    • 3 Pages
    Satisfactory Essays