1answer.
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
Goshia [24]
3 years ago
5

Your task is to write and test a function which takes one argument (a year) and returns True if the year is a leap year, or Fals

e otherwise. The seed of the function is already sown in the skeleton code in the editor. Note: we've also prepared a short testing code, which you can use to test your function. The code uses two lists - one with the test data, and the other containing the expected results. The code will tell you if any of your results are invalid.
Computers and Technology
1 answer:
TiliK225 [7]3 years ago
5 0

Answer:

function isLeapYear( aYear ){

   var confirmYear=  year % 400 === 0 || (year % 100 !== 0 && year % 4 === 0);

   return confirmYear ? True : False;

}

Explanation:

The javascript function above requires an argument which is the year when it is passed, it is analyzed, counting the number of days in that year and a boolean value of true or false is dynamically assigned to the variable 'confirmYear'.

The ternary operator would logically select the right value, which is outputted to the user. To test the function, use the console to call the function with an argument.

console.log( isLeapYear( 1999 ) );

You might be interested in
Which statement compares the copy and cut commands?
ella [17]

Answer: duplicate

Explanation:

5 0
3 years ago
Read 2 more answers
Define Technology. Explain the term.​
aleksandrvk [35]

Answer:

Technology refers to methods, systems, and devices which are the result of scientific knowledge being used for practical purposes. Technology is changing fast. They should be allowed to wait for cheaper technologies to be developed.

7 0
3 years ago
Read 2 more answers
How can you add more bytes to your iPad if there isn't enough storage space?
miv72 [106K]
You cant, you have to either delete items off to gain some storage back or go buy an ipad with more storage
3 0
4 years ago
Read 2 more answers
Ronald attended a seminar about the best practices to use when browsing the Internet. The presenter used the following statement
Salsk061 [2.6K]

Answer:

Ronald missed the words: One-time password, Secure  

Explanation:

Whenever we use public computer, there are possibilities to steal the user data by hackers. It might not be safe to use as like we have protection in personal or Office computers. But when a situation arises to use a public system, it is always recommended to use one-time password so that the logins are not misused thereafter.

Even if the hackers try to misuse, the user will get a message / authentication reply to use the login and thus we are safe. Also, always browse only secured website ie. “https”.

8 0
4 years ago
Read 2 more answers
Select the correct answer.
Vsevolod [243]

Answer:

A.  inspection

Explanation:

To find - Monica, a reviewer, wants to use a formal review for the SQA process. Which review should Monica use for this purpose?

A.  inspection

B . internal audit

C.  test review

D . walkthrough

Proof -

SQA process - Software Quality Assurance process

The correct option is - A.  inspection

Reason -

Formal review in software testing is a review that characterized by documented procedures and requirements. Inspection is the most documented and formal review technique.

The formality of the process is related to factors such as the maturity of the software development process, any legal or regulatory requirements, or the need for an audit trail.

The formal review follows the formal process which consists of six main phases – Planning phase, Kick-off phase, the preparation phase, review meeting phase, rework phase, and follow-up phase.

3 0
3 years ago
Other questions:
  • Tanya has received an email, apparently from her bank, stating that some of her records were lost during server maintenance work
    13·2 answers
  • Jessica wants to purchase a new hard drive. She wants a drive that has fast access because she will use it to edit videos on her
    13·1 answer
  • Why would you use a custom filter?
    11·1 answer
  • When should you save your document?
    15·2 answers
  • Can somebody help me out
    15·1 answer
  • In which situations would it be most helpful to filter a form? Check all that apply.
    8·1 answer
  • BRAINLEST AND 20 POINTS! Most GUls provide all of the following except
    6·2 answers
  • Which of the following is a table which can be rearranged to analyze data in a variety of ways?
    13·1 answer
  • Cleo is new to object oriented programming. which type of action can be taken on on object?
    14·2 answers
  • def transfer(bank, log_in, userA, userB, amount): ''' In this function, you will try to make a transfer between two user account
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!