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
laiz [17]
2 years ago
6

When you park on a hill, think about which way _____.

Computers and Technology
2 answers:
Vinil7 [7]2 years ago
7 0

I don't see why this is on a computer section but either way I would chose D because naturally when you park on a hill you would be cautious about your car going into motion down the hill so therefore you would think of which way gravity would pull your vehicle

Anuta_ua [19.1K]2 years ago
6 0

Answer:

B. your vehicle would roll if an object fell on the accelerator

Explanation:

You might be interested in
Write a function string middle(string str) that returns a string containing the middle character in str if the length of str is
Katen [24]

Answer:

function getMiddle(s) {

return s.length % 2 ? s.substr(s.length / 2, 1) : s.substr((s.length / 2) - 1, 2);

}

// I/O stuff

document.getElementById("submit").addEventListener("click", function() {

input = document.getElementById("input").value;

document.getElementById("output").innerHTML = getMiddle(input);

});

Explanation:

// >>> is an unsigned right shift bitwise operator. It's equivalent to division by 2, with truncation, as long as the length of the string does not exceed the size of an integer in Javascript.

// About the ~ operator, let's rather start with the expression n & 1. This will tell you whether an integer n is odd (it's similar to a logical and, but comparing all of the bits of two numbers). The expression returns 1 if an integer is odd. It returns 0 if an integer is even.

// If n & 1 is even, the expression returns 0.

// If n & 1 is odd, the expression returns 1.

// ~n & 1 inverts those two results, providing 0 if the length of the string is odd, and 1 if the length of the sting is even. The ~ operator inverts all of the bits in an integer, so 0 would become -1, 1 would become -2, and so on (the leading bit is always the sign).

// Then you add one, and you get 0+1 (1) characters if the length of the string is odd, or 1+1 (2) characters if the length of the string is even.

6 0
2 years ago
How can we make our programs behave differently each time they are run?
tensa zangetsu [6.8K]

Answer:

By given the right speech as much as the answers must be

Explanation:

By given the right speech as much as the answers must be

7 0
1 year ago
Use the loop invariant (I) to show that the code below correctly computes the product of all elements in an array A of n integer
NeTakaya

Answer:

Given Loop Variant P = a[0], a[1] ... a[i]

It is product of n terms in array

Explanation:

The Basic Step: i = 0, loop invariant p=a[0], it is true because of 'p' initialized as a[0].

Induction Step: Assume that for i = n - 3, loop invariant p is product of a[0], a[1], a[2] .... a[n - 3].

So, after that multiply a[n - 2] with p, i.e P = a[0], a[1], a[2] .... a[n - 3].a[n - 2].

After execution of while loop, loop variant p becomes: P = a[0], a[1], a[2] .... a[n -3].a[n -2].

for the case i = n-2, invariant p is product of a[0], a[1], a[2] .... a[n-3].a[n-2]. It is the product of (n-1) terms. In while loop, incrementing the value of i, so i=n-1

And multiply a[n-1] with p, i.e P = a[0].a[1].a[2].... a[n-2].

a[n-1]. i.e. P=P.a[n-1]

By the assumption for i=n-3 loop invariant is true, therefore for i=n-2 also it is true.

By induction method proved that for all n > = 1 Code will return product of n array elements.

While loop check the condition i < n - 1. therefore the conditional statement is n - i > 1

If i = n , n - i = 0 , it will violate condition of while loop, so, the while loop will terminate at i = n at this time loop invariant P = a[0].a[1].a[2]....a[n-2].a[n-1]

6 0
2 years ago
Miles to track laps One lap around a standard high-school running track is exactly 0.25 miles. Write a program that takes a numb
fredd [130]

Answer:

Explanation:

#include <iostream>

using namespace std;

//This is the function in the next line

double MilesToLaps(double userMiles) {

double Laps;  

Laps = userMiles * 4;

return Laps

}

//This is the main fucnction

int main(){

double Miles, FinLap;

cout << "Enter the number of miles " << endl;

cin>>Miles;

FinLap = MilesToLaps(Miles);

cout << "The number of laps ran is: "<<setprecision(2)<<Finlap<<endI;

}

3 0
2 years ago
Read 2 more answers
The groups_per_user function receives a dictionary, which contains group names with the list of users. Users can belong to multi
Akimi4 [234]

The groups_per_user function receives a dictionary, which contains group names with the list of users.

Explanation:

The blanks to return a dictionary with the users as keys and a list of their groups as values is shown below :

def groups_per_user(group_dictionary):

   user_groups = {}

   # Go through group_dictionary

   for group,users in group_dictionary.items():

       # Now go through the users in the group

       for user in users:

       # Now add the group to the the list of

         # groups for this user, creating the entry

         # in the dictionary if necessary

         user_groups[user] = user_groups.get(user,[]) + [group]

   return(user_groups)

print(groups_per_user({"local": ["admin", "userA"],

       "public":  ["admin", "userB"],

       "administrator": ["admin"] }))

3 0
2 years ago
Other questions:
  • your monthly living expenses are $1500 on an income of $1,650 per month. your goal is to have an emergency fund of 4 times your
    5·1 answer
  • When a machine on the public network wants to reach the server at 172.30.0.10, which ip will it use?
    6·2 answers
  • In a relational database model, a(n) _____ operation pares down a table by eliminating columns according to certain criteria. in
    8·1 answer
  • Write a method named lastFirst that accepts a string as its parameter representing a person's first and last name. The method sh
    13·1 answer
  • Writing in Java, write a program that prompts the user to input an integer and then outputs both the individual digits of the nu
    15·1 answer
  • Replace any alphabetic character with '_' in 2-character string passCode. Ex: If passCode is "9a", output is: 9_
    6·1 answer
  • What is the name of the program file that you can enter in the Windows search or Run box to execute Event Viewer? What process i
    12·1 answer
  • To operate a vehicle in Florida, you must _____.
    9·2 answers
  • Cloud-based services can open doors to leveraging Artificial Intelligence (AI) without dramatically increasing risk. Which clien
    9·1 answer
  • A record company is using blockchain to manage the ownership of their copyrighted content. The company requires that every time
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!