Answer:
Here is the Python program:
COOKIES_PER_BAG = 40 #sets constant value for bag of cookies
SERVINGS_PER_BAG = 10 #sets constant value for serving in bag
CALORIES_PER_SERVING = 300 #sets constant value servings per bag
cookies = int(input("How many cookies did you eat? ")) #prompts user to input how many cookies he or she ate
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG)); #computes total calories consumed by user
print("Total calories consumed:",totalCalories) #displays the computed value of totalCalories consumed
Explanation:
The algorithm is:
- Start
- Declare constants COOKIES_PER_BAG, SERVINGS_PER_BAG and CALORIES_PER_SERVING
- Set COOKIES_PER_BAG to 40
- Set SERVINGS_PER_BAG to 10
- Set CALORIES_PER_SERVING to 300
- Input cookies
- Calculate totalCalories: totalCalories ← cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG))
- Display totalCalories
I will explain the program with an example:
Lets say user enters 5 as cookies he or she ate so
cookies = 5
Now total calories are computed as:
totalCalories = cookies * (CALORIES_PER_SERVING / (COOKIES_PER_BAG / SERVINGS_PER_BAG));
This becomes:
totalCalories = 5 * (300/40/10)
totalCalories = 5 * (300/4)
totalCalories = 5 * 75
totalCalories = 375
The screenshot of program along with its output is attached.
Answer:
Msinfo32.exe, cmd
Explanation:
The msinfo.exe is a tool that gathers information concerning your computer system and displays a comprehensive view of your system components, hardware, and software environment, that can later be use to diagnose computer issues.
Command Prompt is an interpreter application for command line which is available in nearly all Windows operating systems. It is utilized for executing entered commands.
Answer:
it is complex
employees are not involved
A speaking library is one that offers tapes and C.D.'s to people with sight impairment who cannot read. They are able to enjoy books, poetry and news that is read to them rather than them reading it from a book which may be difficult or impossible. My late father in law was a member of such an organisation and they provided a catalogue of titles available. He had a special machine with touch and large print controls so that he could operate it himself. The database should be a list of titles available and a description as to content and length and possible have a Braille sheet for those who can read Braille.