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
Marina86 [1]
3 years ago
9

A student wants an algorithm to find the hardest spelling word in a list of vocabulary. They define hardest by the longest word.

Computers and Technology
1 answer:
makkiz [27]3 years ago
5 0

Answer:

Initialize the “longest word” by an empty string and update it when a longer word is found

Explanation:

import java.util.stream.Stream;

public static String findLongest(String[] spellingList) {

   return Stream.of(spellingList).reduce("", (longestWord, word) -> (

       longestWord.length() < word.length() ? word : longestWord

   ));

}

You might be interested in
You are a psychologist who needs to provide a qualitative evaluation for IQ scores. Create a program that takes IQ scores (one a
dsp73

Answer:

Check the explanation

Explanation:

#include <iostream>

#include <iomanip>

using namespace std;

int getIQ(); // return the score

void printEvaluation(int);

int main()

{

   int IQ = 0;

   IQ = getIQ();

   

   printEvaluation(IQ);

   return 0;

}

int getIQ()

{

   int score = 0;

   cout << "Please enter your IQ Score to receive your IQ Rating:\n";

   cin >> score;

   

   return score;

}

void printEvaluation(int aScore)

{

   cout << "IQ Score: " << aScore << " IQ Rating: ";

   

   if (aScore <= 100)

   {

       cout << "Below Average\n";

   }

   else if (aScore <= 119)

   {

       cout <<"Average\n";

   }

   else if (aScore <= 160)

   {

       cout << "Superior\n";

   }

   else if (aScore >= 160 )

   {

       cout << "Genius\n";

   }

}

4 0
3 years ago
QUESTION 4 of 10: True or False: According to the reading, investors care about your love for your business.
mixer [17]

Answer:

false

Explanation:

5 0
3 years ago
Read 2 more answers
Search syndication and distribution is when a search engine provides its services to a third-party in need of search capabilitie
iren [92.7K]
The answer is TRUE.  <span>Search syndication and distribution is when a search engine provides its services to a third-party in need of search capabilities for their digital properties. </span>
5 0
3 years ago
9.3 Code Practice
julsineya [31]

Answer:

import random

def grid_maker(x, y):

   return [ [str(random.randint(-30, 30)) for _ in range(x)]for _ in range(y) ]

print ('\n'.join(' '.join(row) for row in grid_maker(4, 5)))

Explanation:

We use a template function and we generate numbers between -30 and 30:

>>> [str(random.randint(-30, 30))]

We also use the str() method so we can later concatenate the integers with \n. If you do not specify the integers, it will cause a crash. Also, keep in mind if we use a variable to store the integers, it will come out more of like a seed than a random grid. For instance, output without the random integers in a variable:

-12 16 -18 -3

7 5 7 10

18 -21 -16 29

21 3 -4 10

12 9 6 -9

Vs with a variable:

-25 6 -25 -20

-25 6 -25 -20

-25 6 -25 -20

-25 6 -25 -20

-25 6 -25 -20

Next we specify the  x and the y:

>>> for _ in range(x)]for _ in range(y) ]

Next we just print it and create a new line every time a row is made

hope this helped :D

5 0
3 years ago
Read 2 more answers
What does an Information security analysts do?
coldgirl [10]

Answer:

Information security analysts install software, such as firewalls, to protect computer networks. Information security analysts plan and carry out security measures to protect an organization's computer networks and systems. Their responsibilities are continually expanding as the number of cyberattacks increases.

Explanation:

hope this helps

4 0
3 years ago
Other questions:
  • ​some forms use a _____ that contains icons or buttons that represent shortcuts for executing common commands.
    14·1 answer
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • rray testGrades contains NUM_VALS test scores. Write a for loop that sets sumExtra to the total extra credit received. Full cred
    5·1 answer
  • Find the reciprocal of 7/2 × 3/5<br>​
    6·1 answer
  • Which are among the ways you can use bitlocker encryption? (choose all that apply?
    5·1 answer
  • In the URL, what is the subdomain and what is the domain name?
    5·1 answer
  • I'd: 9872093250, password: qqqqq, join the meeting​
    11·1 answer
  • What is the console.log function for?​
    13·1 answer
  • What sound customization option would you use in Scratch to simulate a sound happening in a large, empty room (like a theater)?
    8·1 answer
  • Alice is watching a speech over the internet. what type of message is alice attending to?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!