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
pishuonlain [190]
3 years ago
7

Write a Common Lisp function named leapYear which takes no parameters and returns an ordered list containing all leap years from

1800 though 2020. The list of leapyears must be calculated, no points will be given for a hard-coded list.
Computers and Technology
1 answer:
Flura [38]3 years ago
7 0

Answer:

Explanation:

The following code is written in Java and uses a series of IF statements and remainder operator (%) to calculate whether or not a year is a Leap Year. If so it is added to the ArrayList of leapYears, If not then it is skipped. Finally, the ArrayList is printed out to the terminal.

public static void leapYear() {

           ArrayList<Integer> leapYears = new ArrayList();

           for (int i = 1800; i <= 2020; i++) {

               if ((i % 4) == 0) {

                   if ((i % 100) == 0) {

                       if ((i % 400) == 0) {

                           leapYears.add(i);

                       }

                   } else {

                       leapYears.add(i);

                   }

               }

           }

           for (int x : leapYears) {

               System.out.println(x);

           }

       }

You might be interested in
Directions. Read and analyze the sentences below. There are words or phrases to be corrected. Rewrite it on the blank accrording
devlian [24]

Full question attached

Answer and Explanation:

1. There’s need to ask for help and advice from people who have the

knowledge and skills in making a simple electrical gadget.

2. Adapter is used to plug appliances that are far from the main power source.

3. Do not touch the metal pipes while you are doing electrical repairs.

4. Shut off the power at the main switch or circuit breaker and unplug the equipment when working on electricity.

5. Pliers are tools used to grip, pull or cut electric wires.

From the above, we have corrected some of the errors that could be made in everyday home appliances or home electricity. In number 4, it is also worthy of note that shutting off power at the main switch will only require emergency situations otherwise we need only shut off the one for the problem circuit and leave the rest.

5 0
3 years ago
Keisha has been asked to give a presentation about a new method for processing customer returns. The first thing she should do i
SVEN [57.7K]

Answer:

The first thing should Keisha does is determine the purpose of the presentation.

Explanation:

If we are giving any presentation then firstly we should determine the purpose of our presentation.

There are typical reasons for giving any presentation such as:

  • Alerting
  • Persuading
  • Inspiring
  • Enjoyable

By clearly defining the purpose you need to capture the attention of your audience and maintain their interest thoroughly across the oral presentation. Three key elements in any oral presentation process include:

  • Planning
  • Writing
  • Completion

4 0
3 years ago
Travis sends Suri what purports to be a link to an e-birthday card, but when she clicks on the link, software is downloaded to h
12345 [234]

Answer:

Identity Theft

Explanation:

Identity theft is the act of someone who obtains details about someone else illegally.  This is done to find personal and financial information such  name, address,social security number, passwords, and credit card number, phone number, e-mail, etc. Then the hacker can use this information to control bank accounts, e-mails, computers, portray himself as you are, or sell information to someone else.

3 0
3 years ago
In what year was the earliest documented use of the word computer?.
topjm [15]

Answer:

1946

First, to deal with the more recent and most familiar meaning of the word ‘computer’: the word first came to mean an electronic device used to store and communicate information (and all of its subsequent functions) only in the 1940s: the earliest citation in the Oxford English Dictionary is from 1946. This is fitting.

Explanation:

7 0
2 years ago
What was the impetus for corporations to begin entertainment broadcasting on radio?
Sladkaya [172]

To help radio operators on ships stay awake was the impetus for corporations to begin entertainment broadcasting on radio.

e. to help radio operators on ships stay awake

<u>Explanation:</u>

The principal radio station ever on the planet's history was made by Reginald Fessenden on Christmas Eve in 1906 when he radiated a "Christmas show" to the bewildered teams of the boats of the United Fruit Company out in the Atlantic Ocean and the Caribbean Sea.

The main voice and music signals heard over radio waves were transmitted in December 1906 from Brant Rock, Massachusetts (only south of Boston), when Canadian experimenter Reginald Fessenden delivered about an hour of talk and music for specialized onlookers and any radio beginners who may be tuning in.

Radio turned into another type of correspondence and amusement. Between the 1920s and 1950s many radio shows were communicated, and assembling around the radio at night was a typical type of diversion.

4 0
4 years ago
Other questions:
  • Put the following numbers in order from greatest to least:
    13·1 answer
  • In which step of writing a program does a programmer first use a<br> compiler?<br> documentin
    6·1 answer
  • to add data to to a chart, you must format data from another microsoft office product, that automatically opens. whats the name
    10·1 answer
  • Write the proghrams for the following:
    13·1 answer
  • A program that will read each player’s name and golf score as keyboard input,
    9·1 answer
  • Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?
    10·1 answer
  • Which type of loan is based on financial need
    6·1 answer
  • Hello help me with this please if you want to thank you I would give brainlist!
    13·2 answers
  • What are tasks performed by pascaline?​
    8·1 answer
  • How can structure of a table change in sql. What general types of changes are possible
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!