Answer:
- def driving_cost(driven_miles, miles_per_gallon, dollars_per_gallon):
- gallon_used = driven_miles / miles_per_gallon
- cost = gallon_used * dollars_per_gallon
- return cost
-
- miles_per_gallon = float(input("Input miles per gallon: "))
- dollars_per_gallon = float(input("Input dollar per gallon: "))
-
- cost1 = driving_cost(10, miles_per_gallon, dollars_per_gallon)
- cost2 = driving_cost(50, miles_per_gallon, dollars_per_gallon)
- cost3 = driving_cost(400, miles_per_gallon, dollars_per_gallon)
-
- print("$ %.2f" % cost1)
- print("$ %.2f" % cost2)
- print("$ %.2f" % cost3)
Explanation:
The solution is written in Python 3.
Firstly, create a function driving_cost that takes three parameters, driven_miles, miles_per_gallon and dollars_per_gallon (Line 1). In the function, calculate the gallon consumption by applying formula driven_miles / miles_per_gallon and then use it to calculate the cost (Line 2 - 3). Return the cost as output (Line 4).
In the main program, prompt user to input miles per gallon and dollars per gallon and then use these input values as arguments to call the function driving_cost function for three times with each time with different driven_miles value (Line 6 - 11).
At last, use formatted print to display the output to two decimal points (Line 13 - 15).
Answer:
You only get so many ad veiws a day
Explanation:
I think it is 15
That would be (A) because an IDS stands for Intrusion detection system which means that when there’s malicious activity or policy violations. Any malicious activity or violation is typically reported either to an administrator.
Answer:
b) Systems thinking
Explanation:
When answering multimple choices questions, it is important to rule out options which simply doest make sense to be the right answer. Let's discard the c) (collaboration) because the question never states anything related to teamwork, not even a small suggestion about cooperation. option d) looks good but it is important to keep in mind that experemintations does not always consider the steps described on the questions. Experimentation can be performed without rigorous reasoned analysis, on the other hand, abstract reasoning and systems thinking do involve reasoned analysis to envision possible solutions. Why choosing b) and not a) then? This is because abstract reasoning, as the same concept states, it i focused on analysis and interpretations of problems and other cases like understanding the behaviour of natural phenomena for example, while it is not necesaryly linked to implmenting solutions based on a certain set of resources, while, on the other hand, systems thiking does take them into account. Systems thinking is the complete process of evaluation, proposition of solutions and execution from the idea to reality in a sensible way.