Inputs, Outputs, Process To Start Your Pseudocode

Inputs Outputs Processto Start Your Pseudocode Think Of Your Input

Inputs, Outputs & Process To start your pseudocode, think of your inputs and outputs first. Complete the boxes below. Once you are done filling in the blanks, upload this file to Angel. Inputs: Round, Square, Small, Medium, Large, Xlarge, Pepperoni, Ham, Sausage, Bacon, Cheese, Peppers, Pineapple, Mushrooms, Chicken, Onions Problem Statement SubT=PizzaCost+TopCost Total=SubT+Tax Outputs: “Welcomeâ€,PizzaCost, TopCost, SubT, Tax, Total Variables Variable Data Type Brief Outline (or the 30,000 foot view) In the space provide, create a brief outline of this problem. A Little Closer Look Now that you have your outline, file in some of the details.

Place your detailed outline below. Homework # 4 ~ Calories Consumed & Burned Points: 75 Trying to Get Some Exercise You have decided that you need to start eating better and getting some exercise. Since you like riding your bike when the weather is nice and you have access to stationary bike when the weather is not good, you decide to start cycling every day. Also you want to keep better track of the calories you have consumed throughout the day. At the end of the week you want to know the following: What is the total calories consumed and burned for each day?

Assume that for every minute you are cycling you burn 10 calories. What is the deficit or difference between the number of calories you consume and burn? What is the average calories that you burn and consume? What day did you consume the highest amount of calories? What day did you burn the highest calories?

What day did you consume the least amount of calories? What day did you burn the least calories? Every day you plan on logging in a notebook the total number of calories you consume (approximately) and how many minutes you spend on either or both bikes. At the end of the week you plan on loading all of these numbers into a program so that you can analyze the data. Program Requirements Your program will need to do the following: Feature a menu so that all you need to do is enter a letter and the program will perform the necessary task.

Use the following letters to correspond to what the program needs to do: Menu Option Operation T Get Total Calories Consumed and Burned. This will also print out calories consumed and burned per day D Get the deficit or difference between the total calories consumed and burned A Get the averages H Get the highest calories consumed and burned and the corresponding days in which this happened L Get the lowest calories consumed and burned and the corresponding days in which this happened E Exit or exits the program Make sure that whatever choice you make from the menu that it is validated and will not cause the program to stop prematurely Allow you to pick numerous tasks before you are done with the program.

HINT: you will need a loop here. Load both Cycling and Eating amounts when the program loads. In other words, you will not get prompted to load these values separately. Instead, you will initialize your arrays with these numbers at the beginning of the program. Nice clean output.

Utilization of modular programming. At the minimum you should have 5 modules. Some Help with the Logic This program will need to use numerous modules. After you code each module, run it to test it and debug it, if necessary. Do not move on to your next module until you have successfully tested the module you are currently working on.

It is all in the Planning Open up the planning document or a notepad file and start to figure out what this program needs to do, the inputs, the outputs, the variables, the 30,000 foot view and your pseudocode. If you do not want to use the planning document provided, make sure you have all the necessary components in your notepad file. Time to Test the Logic Now that you have planned out your attack, test your logic using Raptor. Use the following test data to test your program. Cycling Eating 15 2,,,,,,,000 Here is my output when I selected T in Raptor: Here is my output when I select D in Raptor Here is my output when I select A in Raptor Here is my output when I select H in Raptor Here is my output when I select L in Raptor Time to Code Once you have your Raptor file working, now it is time to translate that to Python.

Open up IDLE and create a new window. Save your file and give it a name. Open your Raptor file and your new window so that you can see both in your computer screen (like we did in the labs). Translate your Raptor file to Python. As you are putting this together keep the following in mind: Remember the proper flow of a program  declare variables at the top, fill the variables, process the variables and print out the variables Choose good variable names.

These are not too long but descriptive. Take care with your output. This does need to make sense. Don’t forget your comments! Points will be deducted.

Since this program is a little longer than your lab programs, test as you go. If you type all of your code in and then test at the end, your debugging will last longer. Once you have your code typed in, using the test data above, test your program. My output looked like the following when I entered T: When I entered D When I entered A When I entered H When I entered L Try to get your program to look as much like mine as you can. Utilize the format function and the tab character to line your output up.

How I Will Be Graded Please remember that in order to get a C or better in this course, this assignment must be completed. Failure to complete this assignment will result in a grade of C- or worse. Exemplary Competent Developing 11 Completion of Planning Document 8.8 Planning Document is missing a minor element 6.6 Planning Document is missing a major element 7 Completion of Raptor File 5.6 Raptor file is missing a minor element or has a small bug. 4.2 Raptor file is missing a major element or contains multiple bugs. 2 Comments in the code 1.6 Only one comment in code. 1.2 Missing comments 2 Variables declared with appropriate data types and appropriate names 1.6 More than one variable declaration missing or improperly declared 1.2 More than three variables missing.

0 points will be given if there are no declarations. OR was able to complete variable declarations in Raptor file. 3 Displayed menu 2.4 Minor error with the display of the menu 1.8 Major error with the display of the menu or was able to display a menu in Raptor 5 Retrieved the user's choice from the menu and validated it. 4 Minor error with input validation on user's choice. 3 input validation present with a major error OR input validation done correctly in Raptor 8 Get Totals module prints out the total calories burned and consumed.

Also prints out the calories burned and consumed for each day. 6.4 Minor error with the print out of each days calories burned and consumed or minor error in the calculation of total calories burned or consumed 4.8 Major error with the print out of each day’s calories burned and consumed or was able to achieve all exemplary items in Raptor. 6 Get Deficit module displays the difference between calories consumed and burned for each day. 4.8 Minor error in the calculation or in the display of the difference. 3.6 Major error in the calculation or was able to achieve all exemplary items in Raptor.

5 Get Average module calculates and displays the average calories burned and consumed. 4 Minor error in either average calculation. 3 Major error in either calculation or was able to achieve all exemplary items in Raptor. 7 Get Highest module determines the highest amount of calories burned and consumed. Also determines the corresponding day those values occurred. 5.6 Minor error in determining the highest values and/or day. Amounts or day still are outputted to the user. 4.2 Major error in determining the highest values and or day. One or either are missing from the output or was able to achieve all exemplary items in Raptor. 7 Get Lowest module determines the lowest amount of calories burned and consumed.

Also determines the corresponding day those values occurred. 5.6 Minor error in determining the lowest values and/or day. Amounts or day still are outputted to the user. 4.2 Major error in determining the lowest values and or day. One or either are missing from the output or was able to achieve all exemplary items in Raptor.

2 Output looks professional and includes the use of the tab character and the format function. 1.6 Missing one of the required elements. 1.2 Missing more than one of the requirement elements or was able to get all required elements to print in Raptor 65 TOTAL POINTS .0 Handing it all in 1) Log on to our Angel course shell. Navigate to the Homework #4 Drop Box. Upload your planning document, your Raptor file and Python file to drop box. Before you upload your files make sure you click on the rubric to make sure you have everything done.

Paper For Above instruction

This comprehensive project involves creating a Python program that effectively manages and analyzes weekly data on calorie consumption and calories burned through cycling activities. The program is rooted in modular programming principles, incorporates a user-interactive menu, and aims to provide detailed insights into daily and weekly caloric metrics. The key stages include planning, designing, coding, testing, and final implementation, making it an integrated approach to learning programming logic and data handling.

The initial phase emphasizes thorough planning: identifying inputs, outputs, and processes. Inputs include daily recorded calories consumed and minutes cycled each day. Outputs cover total calories consumed and burned, caloric deficits, averages, and days with highest or lowest metrics. The process involves designing a set of modules to handle each of these functions independently, thus fostering modular programming practices. By initializing data arrays at the start, the program ensures seamless data handling throughout execution.

The core logic centers around a menu-driven interface, which requires implementing a loop that displays options such as calculating totals (T), determining deficits (D), computing averages (A), finding maximums (H), minimums (L), and exiting (E). Input validation is crucial to prevent runtime errors and to ensure user choices are correctly processed. Each module performs specific computations: for totals, summing daily values; for deficits, subtracting totals from burned calories; for averages, dividing totals by number of days; for maximum and minimum, iterating over data to find relevant values and corresponding days.

For the coding phase, after thoroughly testing the algorithms in Raptor, the pseudocode is transferred to Python. Proper variable naming conventions, commenting, and consistent formatting are essential. The program must display a professional and clear output, utilizing functions such as format and tab characters for alignment. Testing with sample data demonstrates the program's accuracy and usability, ensuring it meets all specified requirements.

The grading rubric emphasizes completeness of planning, correctness and modularity of code, quality of comments, proper variable declarations, effectiveness of the menu interface, accuracy in calculations, and professional output presentation. Correct implementation of all modules, including total calculation, deficits, averages, maximums, and minimums, is essential for achieving a good grade. The final step involves submitting all components via Angel, ensuring the entire project aligns with the provided rubrics and expectations.

References

  • Downey, A. (2012). Think Python: How to Think Like a Computer Scientist. Green Tea Press.
  • Harvey, J. (2019). Python for Beginners: Learn Programming Python. TechPress.
  • Lutz, M. (2013). Programming Python. O'Reilly Media.
  • Swaroop, C. H. (2009). A Byte of Python. Python Software Foundation.
  • Python Software Foundation. (2022). The Python Language Reference. https://docs.python.org/3/reference/
  • Grinberg, M. (2018). Flask Web Development: Developing Web Applications with Python. O'Reilly Media.
  • Beazley, D., & Jones, B. (2013). Python Cookbook. O'Reilly Media.
  • Van Rossum, G., & Drake, F. L. (2009). Python Reference Manual.
  • Roy, A. (2018). Python Programming for Data Analysis. Data Science Publishing.
  • Chun, W. H. K. (2010). Core Python Programming. Prentice Hall.