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
stealth61 [152]
1 year ago
13

In a particular field, there are trees in a l single row from left to right. Each tree has a value V You cut trees from left to

right and for each tree of value V that you cut, you plant (V+ 1) % M trees on the right most end with values ranging from 0 to ((V+1) % M)-1. Initially, there was only one free with value 2. Find the total number of trees present after cutting K trees.
​

Computers and Technology
1 answer:
Sedbober [7]1 year ago
4 0

Answer:

i dont know help me

Explanation:

You might be interested in
Match each function with its possible output.
mojhsa [17]
1.) B
2.) A
3.) D
4.) C
rand command returns a random number sqrt is going to return a decimal unless its a perfect square however the rand will not the now is quite obvious because it gives a time and date, while the other simply gives the date.
4 0
1 year ago
Read 2 more answers
When should a technician record a system's baseline data?
bija089 [108]

Baseline data is a record of all the system performance specifications when the system is operating as designed. A technician should record a system's baseline data On a new system after it is installed.


3 0
2 years ago
Given three dictionaries, associated with the variables, canadian_capitals, mexican_capitals, and us_capitals, that map province
Nookie1986 [14]

Answer:

The Python code to combine the three dictionaries are is given as follows:

  1. canadian_capital = {
  2.    cash: "SOME VALUES",
  3.    assets: "SOME VALUES"
  4. }
  5. mexican_capital = {
  6.    cash: "SOME VALUES",
  7.    assets: "SOME VALUES"
  8. }
  9. us_capital = {
  10.    cash: "SOME VALUES",
  11.    assets: "SOME VALUES"
  12. }
  13. nafta_capital = {
  14.    canadian: canadian_capital,
  15.    mexican : mexican_capital,
  16.    us: us_capital
  17. }

Explanation:

<u>Line 1 - 14 :</u>

Create three Python dictionaries and name them as <em>canadian_capitals, mexican_capital </em>and<em> us_capitals</em>. Please note a Python dictionaries should be enclosed in curly braces { }.  

We just define two samples of relevant keys (<em>cash </em>and <em>asset</em>) in each of the dictionaries. Python dictionary can map a key to a value.

Since we are not given any capital values from the question,  a dummy string "<em>SOME VALUES</em>" is tentatively set as the value for each of the keys.

In practice, we should replace those dummy strings with the real values of capital. The values can be a number, a string, a list and even a nested dictionary.

<u>Line 16 - 20 : </u>

Create one more Python dictionary and name it as <em>nafta_capital</em>.

Since our aim is to combine the three previous dictionaries (<em>canadian_capitals, mexican_capital </em>and <em>us_capitals</em>) and associate it with <em>nafta_capital</em>, we can define three different keys (<em>canadian, mexican </em>and <em>us</em>) in our dictionary nafta_capital.

As mentioned, a value associated with a key can be a nested dictionary. Hence, we just map <em>canadian_capitals, mexican_capital </em>and <em>us_capitals</em> as the value of the keys (<em>canadian, mexican </em>and<em> us</em>) in dictionary<em> nafta_capital,</em> respectively,

By doing so, we have managed to combine three target dictionaries (<em>canadian_capitals, mexican_capital </em>and <em>us_capitals</em> ) into a single dictionary, <em>nafta_capital</em>.

4 0
1 year ago
Explain how abstraction is used in a GPS system
Pavlova-9 [17]

Answer

Abstraction enables GPS system to facilitate the utilization of well defined interfaces while offering room to add additional levels of functionality which are complex to handle.

Explanation

GPS system applies abstraction to be able to arrange level of complexity on which a user will interact with the system. For example, it establishes a link of satellite positioned and timed systems to allow a radio receiver obtain a signal in four dimension after synchronizing the data of latitude, longitude, attitude and time.


7 0
1 year ago
Read 2 more answers
Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to
Mashcka [7]

Answer:

Following are the program in the C Programming Language.

#include<stdio.h> //header file

#include<string.h> //header file

struct student//creating structure

{

 //set integer variables

int marks;

int roll;

};

//define function

void initial(struct student *stu)

{

 //set integer type variables

int marks=420;

int roll_no=45,i;

stu->marks=marks;//assigning the values

stu->roll=roll_no;//assigning the values

}

//define main method to call the function

int main()

{

struct student stu;

initial(&stu);//calling the function

printf("Total marks : %d\n",stu.marks); //print output

printf("Roll No. : %d\n",stu.roll); //print output

return 0;

}

<u>Output:</u>

Total marks : 420

Roll No. : 45

Explanation:

Here, we define the structure "student" with a struct keyword for creating a structure.

  • inside the structure, we set two integer type variable "marks", "roll".

Then, we define a function "initial()" and pass an argument in the parameter of the function.

  • inside the function, we set two integer type variable "marks", "roll_no" and assign the value in the variable "marks" to 420 and variable "roll_no" to 45.
  • Assign the value in the structure's integer variables from the function's variable.

Finally, we set the main method inside it we call the function "initial()" and pass the value and then, we print the output with message.

8 0
2 years ago
Other questions:
  • What are threats to computer system
    6·1 answer
  • A ____ resembles a circle of computers that communicate with each other.
    14·1 answer
  • Define a function PyramidVolume with double parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the vo
    7·2 answers
  • Given an alphabet, print all the alphabets up to and including the given alphabet.
    15·2 answers
  • Access-lists pose a logical problem which often has more than one solution. Can you think of a different set of rules or placeme
    8·1 answer
  • A function defined beginning with void SetNegativesToZeros(int userValues[], ... should modify userValues such that any negative
    12·1 answer
  • Write a flowchart and C code for a program that does the following: Within main(), it asks for the user's annual income. Within
    12·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • In this code, identify the repeated pattern and replace it with a function called month_days, that receives the name of the mont
    14·1 answer
  • Write a program that takes a single integer input from the user and stores it in a variable. Your program should increase the va
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!