answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Gemiola [76]
2 years ago
5

Write a function named "total_population" that takes a string then a list as parameters where the string represents the name of

a CSV file containing city data in the format "CountryCode,CityName,Region,Population,Latitude,Longitude" and the second parameter is a list where each element is itself a list containing 3 strings as elements representing the CountryCode, CityName, and Region in this order. Return the total population of all cities in the list. Note that the city must match the country, name, and region to ensure that the correct city is being read.
Engineering
1 answer:
adelina 88 [10]2 years ago
5 0

Answer:

Return the total population of all cities in the list.

Explanation:

It is for every element in cityinfo. It works not only for one array but multiple.

I attached the document with the code or function with the name import cvs becuase when I wrote it down and it sent a message written on red about inappropriate words.

Download docx
You might be interested in
The 10-kg block slides down 2 m on the rough surface with kinetic friction coefficient μk = 0.2. What is the work done by the fr
Rashid [163]

Answer:

153.2 J

Explanation:

Let's first list our given parameters;

mass (m) of the block = 10 kg

which slides down ( i.e displacement) = 2 m

kinetic coefficient of friction (μk) = 0.2

In the diagram shown below;  if we take an integral look at the component of force in the direction of the displacement; we have

F_x= Fcos 40°

F_x= 100 (cos 40°)

F_x= 76.60 N

Workdone by the friction force can now be determined as:

W = F_x × displacement

W = 76.60 × 2

W = 153.2 J

∴  the work done by the friction force = 153.2 J

7 0
2 years ago
Outline an algorithm in **pseudo code** for checking whether an array H[1..n] is a heap and determine its time efficiency.
svlad2 [7]

Answer:

Condition to break: H[j] \geq max {H[2j] , H[2j+1]}

Efficiency: O(n).

Explanation:

Previous concepts

Heap algorithm is used to create all the possible permutations with K possible objects. Was created by B. R Heap in 1963.

Parental dominance condition represent a condition that is satisfied when the parent element is greater than his children.

Solution to the problem

We assume that we have an array H of size n for the algorithm.

It's important on this case analyze the parental dominance condition in order to the algorithm can work and construc a heap.

For this case we can set a counter j =1,2,... [n/2] (We just check until n/2 since in order to create a heap we need to satisfy minimum n/2 possible comparisionsand we need to check this:Break condition: [tex]H[j] \geq max {H[2j] , H[2j+1]}

And we just need to check on the array the last condition and if is not satisfied for any value of the counter j we need to stop the algorithm and the array would not a heap. Otherwise if we satisfy the condition for each j =1,2,.....,[n/2]p then we will have a heap.

On this case this algorithm needs to compare 2*(n/2) times the values and the efficiency is given by O(n).

3 0
2 years ago
The air contained in a room loses heat to the surroundings at a rate of 50 kJ/min while work is supplied to the room by computer
Artemon [7]

Answer:

net amount of energy change of the air in the room during a 30-min period = 660KJ

Explanation:

The detailed calculation is as shown in the attached file.

4 0
2 years ago
Read 2 more answers
Tech A says that as moisture levels increase in brake fluid, the boiling point of the brake fluid decreases. Tech B says that fi
dezoksy [38]

Answer: Both Technician A and B are correct.

Explanation:

Technicians A and B are both right about their diagnosis. The Society of Automotive Engineers performed extensive research on vehicle brake fluids and found that there is typically a 2% moisture content in the brake fluid after a year of operating a vehicle. And as the moisture content of the brake fluid rises, the boiling point of the brake fluid decreases as well.

4 0
2 years ago
You should be extra careful during the hours of sunrise, sunset, and nighttime because _____. A. of increased law enforcement ac
torisob [31]

Answer:

B, its the only valid answer

5 0
2 years ago
Other questions:
  • Universal Containers (UC) has a requirement to expose a web service to their business partners. The web service will be used to
    10·1 answer
  • If the current on your power supply exceeds 500 mA it can damage the supply. Suppose the supply is set for 37 V. What is the sma
    9·1 answer
  • Choose the correct sequence of the following events leading to the sensory processing of a stimulus. 1. transmission 2. transduc
    13·1 answer
  • Consider a very long rectangular fin attached to a flat surface such that the temperature at the end of the fin is essentially t
    9·1 answer
  • An aircraft component is fabricated from an aluminum alloy that has a plane-strain fracture toughness of 40 MPa1m (36.4 ksi1in.)
    15·1 answer
  • The driving force for fluid flow is the pressure difference, and a pump operates by raising the pressure of a fluid (by converti
    13·1 answer
  • Suggest how any sorting algorithm can be augmented in a way to make the best-case count of its key comparisons equal to just n−1
    6·1 answer
  • 1. Saturated steam at 4 bars absolute pressure with a mean velocity of 3 m/s flows through a horizontal SS304 stainless-steel pi
    6·1 answer
  • "It is necessary to select a metal alloy for an application that requires a yield strength of at least 345 MPa (50,000 psi) whil
    10·1 answer
  • What is the component called that usually has a dual-voltage selector switch and has cables that connect to the motherboard and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!