Answer:
Following is the loop statement in the Python programming language
salaries=[93.85967,4232.32,13343.3434] #storing the values in salaries
for k in salaries:#iterating the loop
print("%12f"%round(k,2))# print the width of 12 and a precision of 2
Output:
93.860000
4232.320000
13343.340000
Explanation:
Following is the description of the statement
- Declared a dictionary "salaries" and initialized some values into it.
- iterating the for a loop .
- In this for loop print the width 12 and a precision of 2 .The print statement in python will
- print the data with width 12 and a precision of 2 in the console window
Answer:
servers to be upgraded are : APPLICATION AND LOAD BALANCING SERVERS
servers still appropriate to use : DNS AND DHCP SERVERS
Explanation:
The recommendations to be made in line with what the new director of information is asking for includes :
1 ) For the servers to be upgraded : The servers that requires upgrades includes the APPLICATION SERVER and LOAD BALANCING SERVER. this is because these two servers are critical to the growth/expansion of any business, and they handle large volume of data
Recommendations on the servers upgrade includes:
Hardware : 2.3 GHz Intel Xeon Gold 5118 12-Core
CPU chip set : Socket: FCLGA3647, Type: NSBM
Speed : processor 3.2 GHz
caching: > 100 Gb
2) For servers that do not necessarily need to be upgraded : The servers that do not need immediate upgrade are DNS and DHCP
Answer:
#include <stdlib.h>
#include <time.h>
#include<iostream.h>
int main(void) {
int seedVal = 0;
seedVal = 4;
srand(seedVal);
/* Solution*/
cout<<rand() % 149 + 100<<endl;
cout<<rand() % 149 + 100<<endl;
return 0;
}
Explanation:
We start with the required include statements to enable use of srand, rand and time functions. I have also added iostream library to use "cout" function.
After that, the seed is initialized using srand(). And then the two rand functions are called with ranges including and between 100 and 149, and printed out.
Answer:
sum, price, count
Explanation:
Programmers should use significant names for the variables.
Not only it makes it easier for them to remember what kind of information is stored in each variable, but it also makes life simpler for anyone who would read the code later.
Names like sum, price and count are significant names ( assuming they actually hold this kind of data), and will make the re-reading of the program code much easier.
Answer:
Priming.
Explanation:
The brain is the centre of control for all animals. It coordinates the body system, breathing, beating of the heart, memory, gait, speech, sight etc.
Memory is stored in the brain ( the function of the cerebral cortex in the cerebrum). Two types of memory are the long term and the short term memory. The long term memory stores information permanently in the brain, while the short term holds the information for a while and either transfers it to the long term memory or the memory decays.
To retrieve a specific memory from the wide memory of the brain, it activates a strand that leads to the memory, this process is called priming.