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
balu736 [363]
3 years ago
5

The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the

myWords array. The method returns true of the array and phrase have the same number of words and false if they do not. Write the sameNumber method.
Computers and Technology
1 answer:
Eduardwww [97]3 years ago
6 0

Answer:

Answered below.

Explanation:

//Program is written in Kotlin programming language.

fun sameNumber(numWords: String, myWords: List<String>) : Boolean{

//Split words in phrase into list

val str: List<String> = numWords.split(" ")

//Convert to mutable list.

val phrase = str.toMutableList()

val words = myWords.toMutableList()

//Compare the number of items in each list.

if( phrase.size == words.size){

return true

}else{

return false

}

}

You might be interested in
Write a Python function called simulate_observations. It should take no arguments, and it should return an array of 7 numbers. E
Bas_tet [7]

Answer:

import random

def simulate_observations():

   #this generates an array of 7 numbers

   #between 0 and 99 and returns the array

   observations = random.sample(range(0, 100), 7)

   return observations

#here,we call the function created above and print it

test_array = simulate_observations()

print(str(test_array))

6 0
3 years ago
Meeting code =nve-hmqq-qxr<br>​
valentina_108 [34]
Uhhhh meeting code for what
7 0
3 years ago
Read 2 more answers
To use an outline for writing a formal business document, what should you
nydimaria [60]

Answer: D. enter each major point from the outline on a separate line

6 0
3 years ago
How does the integration of system engineering early in the design process provide benefits to the overall design?
pashok25 [27]

Answer:

Systems Engineering helps avoid omissions and invalid assumptions, helps to manage real world changing issues, and produce the most efficient, economic and robust solution.

3 0
2 years ago
What's my favorite song by Maluma
Ahat [919]

Answer:

hawai

Explanation:

80x+90=170 x=1 hope this helps for any future reference plz mark brainliest:D

7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the penalty for refusing to submit to alcohol testing (drivers ed)
    7·2 answers
  • An isotope of an element has:
    11·2 answers
  • What landforms are likely to form at this boundary
    15·1 answer
  • if the bandwidth-delay product of a channel is 500 Mbps and 1 bit takes 25 milliseconds to make the roundtrip, what is the bandw
    6·1 answer
  • This assignment is to code a simple hangman game. The game should choose a random word out of a list of words that are coded int
    8·1 answer
  • Please, ignore
    6·2 answers
  • Please help ASAP!
    15·1 answer
  • Malware is any malicious software installed on a computer or network without the owner’s knowledge.
    10·1 answer
  • Name the technique that uses a scheme to sum the individual digits in a number and stores the unit's digit of that sum with the
    7·1 answer
  • Note that common tasks are listed toward the top, and less common tasks are listed toward the bottom. According to O*NET, what a
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!