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.
A 2015 report showed that Asia had the most super market stores in the world which is about 82,000
To put that in perspective the United States as of 2016 had about 50,000 super markets (walmart grocery center etc) these stores brought in 5.5 trillion dollars since 1992
<span>Not a valid IPv6 address
A valid IPv6 address consist of 8 groups of 4 hexadecimal numbers separated by colons ":". But that can make for a rather long address of 39 characters. So you're allowed to abbreviate an IPv6 address by getting rid of superfluous zeros. The superfluous zeros are leading zeros in each group of 4 digits, but you have to leave at least one digit in each group. The final elimination of 1 or more groups of all zeros is to use a double colon "::" to replace one or more groups of all zeros. But you can only do that once. Otherwise, it results in an ambiguous IP address. For the example of 2001:1d5::30a::1, there are two such omissions, meaning that the address can be any of
2001:1d5:0:30a:0:0:0:1
2001:1d5:0:0:30a:0:0:1
2001:1d5:0:0:0:30a:0:1
And since you can't determine which it is, it's not a valid IP address.</span>
Answer:
<em>Column Access Strobe (CAS) latency</em>
Explanation:
Column Access Strobe (CAS) latency<em> is the time limit between the READ command and the time when information is accessible.</em>
The interval is defined in nanoseconds in asynchronous DRAM(Dynamic random-access memory).The interval is defined in clock cycles in synchronous DRAM.
Since latency depends on a number of clock ticks rather than absolute time, if the clock rate differs, the actual time for a SDRAM (Synchronous dynamic random-access memory) module to respond to a CAS event may vary.