Algorithm Design Document Assignment 1- Oliyad Regasa

.pdf

School

Grand Canyon University *

*We aren’t endorsed by this school

Course

INVESTIGAT

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

2

Uploaded by CorporalRockSalamander39

Assignment xx Algorithmic Design Document Make a copy before you begin (File -> Make a copy). Add the Assignment # above and complete the sections below BEFORE you begin to code and submit with your Assignment to D2L (File -> Download -> PDF). The sections will expand as you type. Description: I want to create a program that calculates the amount you should tip at a restaurant. Sample Program Run: Hello, I hoped you enjoyed your meal Enter the price of your order $15.00 Enter what percent you want to tip:%15 Tip: $ 2.25 Sample Algorithmic Design: a. Identify all of the user input. What are the data types of the inputs? Define the input variables. The first input variable is the cost of the meal the user paid for. The second input is the percentage the user would like to tip their waiter/waitress. b. Describe the program output. What is displayed to the user? What are the data types of the output? Define the output variables. The output to the user is the calculated tip amount.
c. What calculations do you need to do to transform inputs into outputs? List all formulas needed, if applicable. If there are no calculations needed, state there are no calculations for this algorithm. The formula that I will need to use in order to transform my input into an output is Tip= cost * (percentage/100). d. Describe the process needed to transform inputs to outputs using numbered steps . Here is where you would use conditionals, loops, functions or array constructs (if applicable) and explain the process in transforming inputs into outputs. 1. Print a welcome message 2. Prompt user to enter the price of their order to store as variable “cost” 3. Prompt user to enter the percentage they want to tip to store as variable “percentage” 4. Calculate Tip=cost * (percentage/100) 5. Print Tip = (calculated variable)
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