Part 1-
Using a server onyour local machine, create a Python program that will ask the users for the number of grams of carbohydrates, proteins, and fats in an item. Your program will use this input to determine the number of calories and present that item back to the user.
Conversion Formulas:
1g Fat = 9 calories
1g Carbohydrates = 5 calories
1g Protein = 5 calories
Pseudocode for the project:
Declare variables
Fat
Carbohydrates
Protein
Calories
Ask the user for the number of grams of Fat
Ask the user for the number of grams of Carbohydrates
Ask the user for the number of grams of Protein
Compute the number of calories (Fat * 9) + (Carbohydrates * 5) + (Protein * 5)
Display the number of calories
Submit the following supporting documents in the appendix of your Microsoft Word document.
- Screenshots of installing Python on your local machine or on A Cloud Guru Cloud Sandbox
- Include the completed script code as a .py file.
- Include screenshots of the code working on the A Cloud Guru Server or your local machine. Use the following 2 foods for testing (and your screenshots)
- Nature Valley Granola Bar - 7g Fat, 29g Carb, 3g Protein
- Doritos 8g Fat, 18g, Carb, 2g Protein
Provide the following in a minimum 2-page paper:
- Explain the process of installing Python on your local machine or in A Cloud Guru Cloud Sandbox. (Minimum of 100 words)
- Describe the process of turning the pseudocode into code. (Minimum of 50 words)
- Describe the process of making an executable. (Minimum of 50 words)
- Describe the process or running your program. (Minimum of 50 words)
- Describe the process of testing and debugging your program.(Minimum of 50 words)
PLEASE ENSURE THAT THE USER ACCOUNT NAME FOR THE SCRIPTING IS CHRIS! Do not use your real name, use mine (Chris).
Part 2-
In Part 2, you will move over to the Windows environment in the Microsoft Azure sandbox. Use
Guide to Install Python on Windows Server(in the attachments) to guide you (or not if you want to try first without it.)
Once you have your server stood up, you will then download and install Python for Windows. You will then load your Calorie Counter program from Part 1 of this assessment and run it in this environment. You will then write a minimum 1-page paper detailing the steps taken to set up the server, install Python, deploy, and run your program, and clean up the sandbox environment. You will also include screenshots of those processes in the appendix. You will compare and contrast this process to that when you originally created your project.
In your minimum 1-page paper (not including title page, references, or appendix) you will:
● Describe how you set up the Windows environment.
● Describe the process to install Python.
● Describe the process to bring your code to the server.
● Describe how you executed your code.
● Describe how you cleaned up the environment.
● Compare and contrast this process to when you originally built the program.
● Include screenshots in the appendix of setting up the Windows environment.
● Include screenshots in the appendix of installing Python.
● Include screenshots in the appendix of executing your code. Use the following 2 foods for testing (and your screenshots).
○ Nature Valley Granola Bar - 7g Fat, 29g Carb, 3g Protein
○ Doritos 8g Fat, 18g, Carb, 2g Protein
● Include screenshots in the appendix of cleaning up the sandbox environment.