Answer:
def population_density(dictionary_list):
""" this function calculates the population density of a list of countries"""
total_population= 0
total_area= 0
for country in dictionary_list:
total_population += country['population']
total_area += country['area']
population_density = total_population / total_area
return population_density
Explanation:
In python, functions are defined by the "def" keyword and a dictionary is used to hold immutable data key and its value. The for loop is used to loop through the list of dictionaries and the values of the country data and extracted with bracket notation.
how do you run a function in python?
why is operating system pivotal in teaching and learning
Answer:
Kindly see explanation
Explanation: The operating system is a huge part of a computer system which plays a an invaluable role in the working of computer programs, hardwares and influences the overall experience of the user. It operating system serves as the interface between the computer hardware itself and the user who may wish to perform different tasks using a computer. In other to teach and learn, it is necessary to input and also obtain output, store our files and process and most essentially one may need to install application programs or softwares, all these functions are made possible with the help of an operating system. In essence, a system without an operating system can perform very little to no function at all. So basically teaching and learning becomes difficult. Teaching and Learning tools such as video, writing and other application softwares cannot be installed without an operating system and thus teaching or learning becomes impossible in it's absence.
Write an INSERT statement that adds this row to the Categories table:
CategoryName: Brass
Code the INSERT statement so SQL Server automatically generates the value for the CategoryID column.
Answer:
INSERT INTO categories (CategoryName)
VALUES ('Brass Code');
Explanation:
The SQL refers to the Structured Query Language in which the data is to be designed and maintained that occurred in the relational database management system i.e it is to be used for maintaining and query the database
Now the INSERT statement should be written as follows
INSERT INTO categories (CategoryName)
VALUES ('Brass Code');
Consider the following calling sequences and assuming that dynamic scoping is used, what variables are visible during execution of the last function called? Include with each visible variable the name of the function in which it was defined.a. Main calls fun1; fun1 calls fun2; fun2 calls fun3b. Main calls fun1; fun1 calls fun3c. Main calls fun2; fun2 calls fun3; fun3 calls fun1d. Main calls fun3; fun3 calls fun1e. Main calls fun1; fun1 calls fun3; fun3 calls fun2f. Main calls fun3; fun3 calls fun2; fun2 calls fun1void fun1(void);void fun2(void);void fun3(void);void main() {Int a,b,c;…}void fun1(void){Int b,c,d;…}void fun2(void){Int c,d,e;…}void fun3(void){Int d,e,f;…}
Answer:
In dynamic scoping the current block is searched by the compiler and then all calling functions consecutively e.g. if a function a() calls a separately defined function b() then b() does have access to the local variables of a(). The visible variables with the name of the function in which it was defined are given below.
Explanation:
In main() function three integer type variables are declared: a,b,c
In fun1() three int type variables are declared/defined: b,c,d
In fun2() three int type variables are declared/defined: c,d,e
In fun3() three int type variables are declared/defined: d,e,f
a. Main calls fun1; fun1 calls fun2; fun2 calls fun3
Here the main() calls fun1() which calls fun2() and fun2() calls func3() . This means first the func3() executes, then fun2(), then fun1() and last main()
Visible Variable: d, e, f Defined in: fun3
Visible Variable: c Defined in: fun2 (the variables d and e of fun2
are not visible)
Visible Variable: b Defined in: fun1 ( c and d of func1 are hidden)
Visible Variable: a Defined in: main (b,c are hidden)
b. Main calls fun1; fun1 calls fun3
Here the main() calls fun1, fun1 calls fun3. This means the body of fun3 executes first, then of fun1 and then in last, of main()
Visible Variable: d, e, f Defined in: fun3
Visible Variable: b, c Defined in: fun1 (d not visible)
Visible Variable: a Defined in: main ( b and c not visible)
c. Main calls fun2; fun2 calls fun3; fun3 calls fun1
Here the main() calls fun2, fun2 calls fun3 and fun3 calls fun1. This means the body of fun1 executes first, then of fun3, then fun2 and in last, of main()
Visible Variable: b, c, d Defined in: fun1
Visible Variable: e, f Defined in: fun3 ( d not visible)
Visible Variable: a Defined in: main ( b and c not visible)
Here variables c, d and e of fun2 are not visible
d. Main calls fun3; fun3 calls fun1
Here the main() calls fun3, fun3 calls fun1. This means the body of fun1 executes first, then of fun3 and then in last, of main()
Visible Variable: b, c, d Defined in: fun1
Visible Variable: e, f Defined in: fun3 ( d not visible )
Visible Variable: a Defined in: main (b and c not visible)
e. Main calls fun1; fun1 calls fun3; fun3 calls fun2
Here the main() calls fun1, fun1 calls fun3 and fun3 calls fun2. This means the body of fun2 executes first, then of fun3, then of fun1 and then in last, of main()
Visible Variable: c, d, e Defined in: fun2
Visible Variable: f Defined in: fun3 ( d and e not visible)
Visible Variable: b Defined in: fun1 ( c and d not visible)
Visible Variable: a Defined in: main ( b and c not visible)
f. Main calls fun3; fun3 calls fun2; fun2 calls fun1
Here the main() calls fun3, fun3 calls fun2 and fun2 calls fun1. This means the body of fun1 executes first, then of fun2, then of fun3 and then in last, of main()
Visible Variable: b, c, d Defined in: fun1
Visible Variable: e Defined in: fun2
Visible Variable: f Defined in: fun3
Visible Variable: a Defined in: main
The penalties for ignoring the requirements for protecting classified information when using social networking services are _________________ when using other media and methods of dissemination.
The penalties for ignoring the requirements for protecting classified information when using social networking services are the same when using other media and methods of dissemination.
The penalties are the same because it does not matter what the medium used, the effect is that classified information and confidential details have been left unguarded and exposed.
When in hold of such information, it is not okay to leave it unguarded or exposed. A person who is found guilty of disclosure of classified materials would face sanctions such as:
They would be given criminal sanctionsThey would face administrative sanctionsThey would also face civil litigationsRead more on https://brainly.com/question/17207229?referrer=searchResults
A machine on a 10 Mbps network is regulated by a token bucket algorithm with a fill rate of 3 Mbps. The bucket is initially filled to capacity at 3MB. How long can the machine transmit at the full 10 Mbps capacity
Explain data hazard and structural hazard. Then, explain how we can prevent each type of hazard. Provide two examples to support your explanations
Answer:
Answered below
Explanation:
Data hazards happen when instructions exhibiting data dependence modify data in the different stages of a pipeline. Potential data hazards when not attended to, can result in race hazards or race conditions. Examples of situations where data hazards can occur is read after write, write after read, write after write. To resolve data hazards we can insert a pipeline whenever a read after write, dependence is encountered, use out-of-order execution or use operand forwarding.
Structural hazards happen when multiple instructions which are already in pipeline new the same resource. Example is a situation which many instructions are ready to execute an there is a single Arithmetic Logic Unit. Methods for preventing this hazard include pipeline break an pipeline flushing.
what makes''emerging technologies'' happen and what impact will they have on individuals,society,and environment
Answer:
Please refer to the below for answer.
Explanation:
Emerging technology is a term given to the development of new technologies or improvement on existing technologies that are expected to be available in the nearest future.
Examples of emerging technologies includes but not limited to block chain, internet of things, robotics, cognitive science, artificial intelligence (AI) etc.
One of the reasons that makes emerging technology happen is the quest to improving on existing knowledge. People want to further advance their knowledge in terms of coming up with newest technologies that would make task faster and better and also address human issues. For instance, manufacturing companies make use of robotics,design, construction, and machines(robots) that perform simple repetitive tasks which ordinarily should be done by humans.
Other reasons that makes emerging technology happens are economic benefit, consumer demand and human needs, social betterment, the global community and response to social problems.
Impact that emerging technology will have on;
• Individuals. The positive effect of emerging technology is that it will create more free time for individuals in a family. Individuals can now stay connected, capture memories, access information through internet of things.
• Society. Emerging technology will enable people to have access to modern day health care services that would prevent, operate, train and improving medical conditions of people in the society.
• Environment. Before now, there have been global complains on pollution especially on vehicles and emission from industries. However, emerging technology will be addressing this negative impact of pollution from vehicles as cars that are currently being produced does not use petrol which causes pollution.
what makes ''emerging technologies'' happen is the necessity for it, the need for it in the society.
The impact they will have on individuals ,society,and environment is that it will improve areas of life such as communication, Transportation, Agriculture.
What is Emerging technologies?Emerging technologies can be regarded as the technologies in which their development as will as practical applications are not yet realized.
Learn more about Emerging technologies at:
https://brainly.com/question/25110079
Question 16
Which of the following may not be used when securing a wireless connection? (select multiple answers where appropriate)
WEP
VPN tunnelling
Open Access Point
WPA2
WPA2
Nahan nah
Answer:
wpa2 wep
Explanation:
wpa2 wep multiple choices
Access controls are enforced automatically in FMS service routines that access and manipulate files and directories.
a True
b. False
Answer:
A. True
Explanation:
In FMS service routines, access controls are enforced automatically
and they that access and manipulate files and directories. Files and directories are usually accessed via access controls in most of the FMSs.
Additional processing overhead are usually imposed by FMS. Also, the FMS tend to restrict and hinder one from accessing secondary storage.
b. Does “refactoring” mean that you modify the entire design iteratively? If not, what does it mean?
Explanation:
Refactoring consists of improving the internal structure of an existing program's source code, while preserving its external behavior.
You resurrected an old worksheet. It appears to contain most of the information that you need, but not all of it. Which step should you take next
Answer:
The answer is "check the worksheet is not read only"
Explanation:
The read only mode is used for read the file data, and it doesn't allows the user to update the file, and for updating the worksheet we should check iut does not open in the read-only mode.
If it is open, then we close it and for close we goto the office button and click on the tools option after that goto general setting, in this there is a check box for turn off the read-only mode.
When you start your computer then which component works first?
In using cloud infrastructures, the client necessarily cedes control to the CP on a number of issues that may affect security
a. True
b. False
Answer:
A. True
Explanation:
The correct option is A. True.
Actually, in using cloud infrastructures, the client necessarily cedes control to the CP on a number of issues which may affect security. It may have to restrict port scans and even penetration testing. Moreover, the service level agreements may not actually guarantee commitment to offer such services on the part of the CP. This may result in leaving a gap in security defenses.
Also, when the control of the CP changes, it's evident that the terms and conditions of their services may also change which may affect security.
For this lab, imagine you are an IT Specialist at a medium-sized company. The Human Resources Department at your company wants you to find out how many people are in each department. You need to write a Python script that reads a CSV file containing a list of the employees in the organization, counts how many people are in each department, and then generates a report using this information. The output of this script will be a plain text file.
Answer:
import csv
import sys
file_csv = argv
with open( "file_csv", "rb" ) as file:
rowlist= csv.DictReader( file )
dict_count={ }
for row in rowlist:
dict_count[ row[ 'department' ] ] = dict_count.get( row[ 'department' ], 0 ) + 1
print( " The count of employees per department are", dict_count )
Explanation:
The python script in the solution above is able to accept user input csv files via command prompt and get an output of the number of employees for each department.
Declare a struct named PatientData that contains two integer data members named heightInches and weightPounds. Sample output for the given program:Patient data: 63 in, 115 lbs#include using namespace std;/* Your solution goes here */int main() {PatientData lunaLovegood;lunaLovegood.heightInches = 63;lunaLovegood.weightPounds = 115;cout << "Patient data: "<< lunaLovegood.heightInches << " in, "<< lunaLovegood.weightPounds << " lbs" << endl;return 0;}
Answer:
struct PatientData{
int heightInches, weightPounds;
};
Explanation:
In order to declare the required struct in the question, you need to type the keyword struct, then the name of the struct - PatientData, opening curly brace, data members - int heightInches, weightPounds;, closing curly brace and a semicolon at the end.
Note that since the object - lunaLovegood, is declared in the main function, we do not need to declare it in the struct. However, if it was not declared in the main, then we would need to write lunaLovegood between the closing curly brace and the semicolon.
The first electric, general-purpose computer, ENIAC, was programmed by calculating algorithms on paper entering code directly into the computer flipping switches by hand using MS-DOS as the operating system
Complete Question:
The first electric, general-purpose computer, ENIAC, was programmed by?
Group of answer choices.
A. Calculating algorithms on paper.
B. Entering code directly into the computer.
C. Flipping switches by hand.
D. Using MS-DOS as the operating system.
Answer:
C. Flipping switches by hand.
Explanation:
The first electric, general-purpose computer, ENIAC, was programmed by flipping switches by hand.
ENIAC is an acronym for Electronic Numerical Integrator and Computer, it was developed in 1945 by John Mauchly and J. Presber Eckert. ENIAC was used for solving numerical problems or calculation-related tasks by the process of reprogramming.
In order to give the ENIAC a series of machine instructions to follow in the execution of a task, the programmers had to undergo the cumbersome procedure of connecting, removing, reconnecting cables and flipping switches by hand because data couldn't be stored in memory.
Maintaining public libraries is a waste of money since computer technology can replace their functions. Do you agree or disagree?
Answer:
I totally do not agree that maintaining public library is a waste of moneyExplanation:
Most library are now advancing in terms of service delivery and public
libraries are no exception as libraries are now incorporating E- platforms/E- libraries, Audio visuals, where anyone can learn or borrow materials electronically.
Furthermore, not everyone can own a computer set to so that public libraries are even relevant to the majorities who can afford a computer set.
Also a library especially the public library is a place where people can meet and socialize to the end we even make friends at the public library more effectively than the online library can make(if they can).
In summary the pros of physical public libraries can not be over emphasized.
what are three ways to add receipts to quick books on line receipt capture?
Answer:
1) Forward the receipt by email to a special receipt capture email
2) You can scan, or take a picture of the receipt and upload it using the QuickBooks mobile app.
3) You can also drag and drop the image, or upload it into QuickBooks Online receipt center.
Explanation:
1) Th first process is simply done using the email address
2) On the app, tap the Menu bar with icon ≡. Next, tap Receipt snap., and then
tap on the Receipt Camera. Yo can then snap a photo of your receipt, and tap on 'Use this photo.' Tap on done.
3) This method can be done by simply navigating on the company's website.
(Process scores in a text file) Suppose that a text file contains an unspecified number of scores. Write a program that reads the scores from the file and displays their total and average. Scores are separated by blanks. Your program should prompt the user to enter a filename. Here is a sample run:
Answer:
Here is the Python program:
def scores(file): # method scores that takes a file name as parameter and returns the sum and average of scores in a file
with open(file, 'r') as infile: # open the file in read mode
lines = [score.split() for score in infile] # split the scores into a list
print("The scores are:",lines) #print the scores
for line in lines: # loops through each score
total= sum(int(score) for score in line) # adds the scores
average =total/len(line) # computes average by taking sum of scores and dividing by number of scores in file
print("The sum is:", total) #prints the sum of scores
print("The average is:", "{:.2f}".format(average)) #prints the average
filename = input("Enter name of the file: ") #prompts user to enter name of file
scores(filename) #calls scores method by passing the file name to it in order to compute sum and average of file contents i.e. scores
Explanation:
It is assumed that the scores in the file are separated by a blank space.
The scores() method takes a file name as parameter. Then it opens that input file in read mode using object infile.
split() method is used to split the scores in a file into a list. Suppose the scores are 1 2 3 4 5 6 . So after the split, they become ['1', '2', '3', '4', '5', '6']
The loop iterates through each score in the file, splits them into a list and stores this list in lines. The next print statement prints these scores in a list.
The second loop for line in lines iterates through each score of the list and the statements: total= sum(int(score) for score in line) and average =total/len(line) computes the total and average of scores.
total= sum(int(score) for score in line) statement works as follows:
for loop iterates through each element of list i.e. each score
int() converts that string element into integer.
sum() method adds the integers to compute their total.
So if we have ['1', '2', '3', '4', '5', '6'] each element i.e. 1,2,3,4,5,6 is converted to integer by int() and then added together by sum method. So this becomes 1+2+3+4+5+6 = 21. This result is stored in total. Hence
total = 21.
average = total/len(line) works as follows:
The computed sum of scores stored in total is divided by the number of scores. The number of scores is computed by using len() method which returns the length of the line list. So len() returns 6. Hence
average = total/len(line)
= 21 / 6
average = 3.5
The next two print statement prints the value of sum and average and "{:.2f}".format(average)) prints the value of average up to 2 decimal places.
The screenshot of the program along with its output is attached.
In Antivirus Software, Heuristic detection looks for things like anomalies, Signature based detection uses content matches.a. Trueb. False
Answer:
true
Explanation:
A ………….. is a basic memory element in digital circuits and can be used to store 1 bit of information.
Answer:
A memory cellExplanation: Research has proven that ;
The memory cell is also known as the fundamental building block of computer memory.
It stores one bit of binary information and it must be set to store a logic 1 (high voltage level) and reset to store a logic 0 (low voltage level).
A direct-mapped cache holds 64KB of useful data (not including tag or control bits). Assuming that the block size is 32-byte and the address is 32-bit, find the number of bits needed for tag, index, and byte select fields of the address.
Answer:
A) Number of bits for byte = 6 bits
B) number of bits for index = 17 bits
C) number of bits for tag = 15 bits
Explanation:
Given data :
cache size = 64 kB
block size = 32 -byte
block address = 32 -bit
number of blocks in cache memory
cache size / block size = 64 kb / 32 b = 2^11 hence the number of blocks in cache memory = 11 bits = block offset
A) Number of bits for byte
[tex]log _{2} (6)^2[/tex] = 6 bits
B) number of bits for index
block offset + byte number
= 11 + 6 = 17 bits
c ) number of bits for tag
= 32 - number of bits for index
= 32 - 17 = 15 bits
Cloud computing gives you the ability to expand and reduce resources according to your specific service requirement.
a. True
b. False
Answer:
a. True
Explanation:
Cloud computing can be defined as a type of computing that requires shared computing resources such as cloud storage (data storage), servers, computer power, and software over the internet rather than local servers and hard drives.
Generally, cloud computing offers individuals and businesses a fast, effective and efficient way of providing services.
In Computer science, one of the most essential characteristics or advantages of cloud computing is rapid elasticity.
By rapid elasticity, it simply means that cloud computing gives you the ability to expand and reduce resources according to your specific service requirement because resources such as servers can be used to execute a particular task and after completion, these resources can then be released or reduced.
Some of the examples of cloud computing are Google Slides, Google Drive, Dropbox, OneDrive etc.
Which of the factors below is NOT a cause of online disinhibition?
O Anonymity
O Lack of nonverbal cues
Lack of tone of voice
Smartphones
Answer:
Lack of tone of voice
Explanation:
Remember, online disinhibition refers to the tendency of people to feel open in communication via the internet than on face to face conversations.
A lack of tone voice isn't categorized as a direct cause of online disinhibition because an individual can actually express himself using his tone of voice online. However, online disinhibition is caused by people's desire to be anonymous; their use of smartphones, and a lack of nonverbal cues.
Consider the following Stack operations:
push(d), push(h), pop(), push(f), push(s), pop(), pop(), push(m).
Assume the stack is initially empty, what is the sequence of popped values, and what is the final state of the stack? (Identify which end is the top of the stack.)
Answer:
Sequence of popped values: h,s,f.
State of stack (from top to bottom): m, d
Explanation:
Assuming that stack is initially empty. Suppose that p contains the popped values. The state of the stack is where the top and bottom are pointing to in the stack. The top of the stack is that end of the stack where the new value is entered and existing values is removed. The sequence works as following:
push(d) -> enters d to the Stack
Stack:
d ->top
push(h) -> enters h to the Stack
Stack:
h ->top
d ->bottom
pop() -> removes h from the Stack:
Stack:
d ->top
p: Suppose p contains popped values so first popped value entered to p is h
p = h
push(f) -> enters f to the Stack
Stack:
f ->top
d ->bottom
push(s) -> enters s to the Stack
Stack:
s ->top
f
d ->bottom
pop() -> removes s from the Stack:
Stack:
f ->top
d -> bottom
p = h, s
pop() -> removes f from the Stack:
Stack:
d ->top
p = h, s, f
push(m) -> enters m to the Stack:
Stack:
m ->top
d ->bottom
So looking at p the sequence of popped values is:
h, s, f
the final state of the stack:
m, d
end that is the top of the stack:
m
Why MUST you request your DSO signed I-20 ship as soon as it is ready and who is responsible to request the I-20
Why MUST you request your DSO signed I-20 ship as soon as it is ready and who is responsible to request the I-20?
a. It is required you have an endorsed/signed I-20 when Customs and Border Patrol or police ask for it
b. We only keep an unsigned digital copy and cannot sign an I-20 after the fact
c. It is against U.S. regulations to send digital (signed or not) DS-2019s and must treat I-20s the same
d. You will need all signed original I-20s to make copies to apply for OPT, STEM and H-1B in the future, so get them now!
e. It is the student’s choice to request each term, however, we cannot go back retroactively to provide past copies
f. We can only provide a signed copy of current I-20 and if changes occur from previous semesters that information will not show
g. The original endorsed I-20 signed by a DSO will be destroyed after 30 days of issuance if not picked up, and it cannot be replicated
h. The cost to have I-20 shipped may go up at any time
i. All the above
Answer:
i. All the above
Explanation:
DSO means designated school officials and they have to do with Student and Exchange Visitor Program (SEVP)-certified schools where students have to get a Form I-20, “Certificate of Eligibility for Nonimmigrant Student Status which provides information about the student's F or M status.
What a student must request for from his DSO signed I-20 ship are all the above options.
1a) Skills are increasingly the key variable of the entire process of access and information inequality in the information society. Discuss the 21st century competencies or skills required in the information society and four ways (4) you can apply it during Supported Teaching on Schools.
Answer:
Explanation:
Skill acquisition improves quality, competence and competitiveness of an individual, It boost the chances of success and ability to make an impact. Access to information plays a verybhuge role in the society as it enables hearers to get updated while those who aren't informed are left behind. Some of the key competences or skills required in the information society include:
Critical thinking : Problem identification and ways to solve them.
Information sourcing and gathering : knowing where to get vital informations and facts
Effective communication, creativity, leadership, social, media and technological skills and so on.
The skills could be can be applied on schools in the form of :
Creating clubs such as the writing and debate clubs where students are given a research topic to write and present, this improves their research ability and communication skill.
Group project or assignment improves collaboration between members.
Assignments or projects requiring technology : Students may be given problems to solve with the use of computers moutwr programs and technology, this will help mad improve productivity.
Reward for innovation: Students should be paused mad encouraged for being creative, this will improve such individual and push others as well.
what are the morals and ethics of computer
Answer:
Computer ethics is a part of practical philosophy concerned with how computing professionals should make decisions regarding professional and social conduct. Margaret Anne Pierce, a professor in the Department of Mathematics and Computers at Georgia Southern University has categorized the ethical decisions related to computer technology and usage into three primary influences:
The individual's own personal code.
Any informal code of ethical conduct that exists in the work place.
Exposure to formal codes of ethics.
Explanation:
What are the constraints for designing small and large files and how these are resolved in different file system
Answer:
space management and buffering speed.
Explanation:
There are different types of file management systems in a computer system, examples of which are NTFS, FAT, WAFL, etc, and are governed by protocols like NFS, TFTP, FTP, etc.
These file systems are used in storages like the hard disk drive, CD and DVD, solid-state drive, etc, to organize or manage the files from boot setup, device drivers to permission-seasoned user files.
Files in storage range from small to large files, for which the schema of the file system must adjust to manage and allocate free space to other files in the future. The file system is also able to index the location of a file for retrieval to a cache memory, making buffering faster.