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
elena55 [62]
2 years ago
10

Complete the function ConvertToDecadesAndYears to convert totalYears to decades and years. Return decades and years using the Ti

meDecadesYears struct. Ex: 26 years is 2 decades and 6 years.

Computers and Technology
1 answer:
Sergeeva-Olga [200]2 years ago
6 0

Answer:

It is a C++ program. The complete function   ConvertToDecadesAndYears which takes totalYears as parameter and convert totalYears to decades and years is provided in the attached document.

Explanation:

The explanation is provided in the attached document.

The screenshot of the complete code along with its output is attached.

You might be interested in
Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
Burka [1]

Answer:

By Using the Greedy- Activity- Selection algorithm

Explanation:

The Greedy- Activity- Selection algorithm in this case involves

First finding a maximum size set S1, of compatible activities from S for the first lecture hall.

Then using it again to find a maximum size set S2 of compatible activities from S - S1 for the second hall.

This is repeated till all the activities are assigned.

It requires θ(n2) time in its worse .

3 0
2 years ago
A homeowner uses a smart assistant to set the house alarm, get packages delivery updates, and set time on the outdoor lights. Wh
ch4aika [34]

The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

The following information related to artificial intelligence is:

  • It refers to the human intelligence where the machines could be treated as humans and according to this, the actions should be mimic.
  • It should be used for any kind of machine where the traits should be associated along with the mind of the human-like for learning & problem-solving purpose.

Therefore we can conclude that The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

Learn more about the machine here: brainly.com/question/2555822

3 0
2 years ago
Suppose the information content of a packet is the bit pattern 1110 0110 1001 1101 and an even parity scheme is being used. What
marta [7]

Answer:

\left[\begin{array}{ccccc}1&1&1&0&1\\0&1&1&0&0\\1&0&0&1&0\\1&1&0&1&1\\1&1&0&0&0\end{array}\right]

Explanation:

To keep the checksum length minimum ,checksum field should be a 4x4 matrix with two dimensional even parity bit.

For this purpose first create a matrix of RxC dimensions and add one even parity bit at the end of each row and column.

parity bit is sort of a check flag used to detect errors in binary data.Error detection is done by adding total number of  1's in the binary sequence.

There are two types of parity bits

  1. Even
  2. Odd

For even parity if total number of 1 is even parity bit for that sequence would be (0).

For even parity if total number of 1 is odd parity bit for that sequence would be (1)

For odd parity if total number of 1 is odd parity bit for that sequence would be (0)

For odd parity if total number of 1 is even parity bit for that sequence would be (1)

4 0
2 years ago
Assume that machines A and B are on the same network 10.3.2.0/24. Machine A sends out spoofed packets, and Machine B tries to sn
Zanzabum

Answer:

Explanation:

Assuming the spoofed 1.2.3.4, it will be sent out ARP to a router that is alive and get it MAC. Then the spoofed packet will be able to be sent out. If A spoofed 10.0.2.30, because it is a local address, it will send an ARP to the machine for been able to get the MAC. But, the IP address 10.0.2.30 is not original making it to be fake, so it will not replay to A, for this reason the spoofed packet cannot be sent out.

7 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
2 years ago
Other questions:
  • Jacob wants to be a Steamfitter. He just finished his associate’s degree. Which best describes what he should do next?
    10·2 answers
  • Splunk uses ________ to categorize the type of data being indexed..
    11·2 answers
  • 9.10: Reverse ArrayWrite a function that accepts an int array and the array ’s size as arguments . The function should create a
    9·1 answer
  • Survey Q, Non-scoring: What role are you playing in your team?
    5·2 answers
  • If, instead, charge 3 is located to the left of charge 1 at a point (on the x axis) that satisfies the conditions given in the p
    7·1 answer
  • Represent the logic of a program that allows the user to enter a value for one edge of a cube. The program calculates the surfac
    10·1 answer
  • SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Assume that the classes listed in the Java Quick R
    9·1 answer
  • In this question, you will experimentally verify the sensitivity of using a precise Pi to the accuracy of computing area. You ne
    14·1 answer
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
  • a key part of staying safe is employing good habits. drag the step number to the proper sequence triple a
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!