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
saul85 [17]
3 years ago
6

Public static String doSomething(String s) { final String BLANK = " "; //BLANK contains a single space String str = ""; //empty

string String temp; for (int i = 0; i < s.length(); i++) { temp = s.substring(i, i + 1); if (!(temp.equals(BLANK))) str += temp;
}
return str;
}
Which of the following is themost precise description ofwhat doSomething does?
A. It returns a String that contains s.length() blanks.
B. It returns s with all its blanks removed.
C. It returns s unchanged.
D. It returns a String that is equivalent to s with all its blanks removed.
E. It returns a String that is an exact copy of s.

Computers and Technology
1 answer:
storchak [24]3 years ago
3 0

Answer:

D. It returns a String that is equivalent to s with all its blanks removed

Explanation:

You might be interested in
g You need to create a program that will read the scores from the CSV file, pass the scores as a list to the finalGrade function
Goshia [24]

Answer:

def finalGrade(scoresList):

""" Function that finds the final grade """

hw1_weighted = float(scoresList[0])/10 * 0.05

hw2_weighted = float(scoresList[1])/10 * 0.05

mid_weighted = float(scoresList[2])/100 * 0.40

fin_weighted = float(scoresList[3])/100 * 0.50

final_grade = (hw1_weighted + hw2_weighted + mid_weighted + fin_weighted) * 100

return final_grade

if __name__ == '__main__':

''' Reading and processing scores '''

# Reading names from text file

names = []

# Opening text file

with open("d:\\Python\\names.txt", "r") as fp:

# Reading data

for line in fp:

# Stripping new line

line = line.strip()

# Adding to list

names.append(line)

# Reading scores

finalGrades = []

# Reading scores

with open("d:\\Python\\scores.csv", "r") as fp:

# Reading data

for line in fp:

# Stripping new line

line = line.strip()

# Scores list

scores = []

# Iterating over scores

for score in line.split(','):

# Adding to list

scores.append(score)

# Finding grade

grade = finalGrade(scores)

# Adding to list

finalGrades.append(grade)

# Printing result

for i in range(len(names)):

print("\n%s earned %.1f%%"%(names[i], finalGrades[i]))

Explanation:

This program was implemented with python programming language.

This program will read the scores from the CSV file, pass the scores as a list to the finalGrade function, and display the resulting final grade, along with the student's name.

See attachment for screenshots

6 0
3 years ago
Question 4 1 pts The following code could be rewritten using: if (x &gt; 12): if (x &lt; 34):​
artcher [175]

Answer:

if(x>12 || x<34)

Explanation:

Mashing the two together using the or '||' operator would allow to run both necessary functions for the next code.

7 0
3 years ago
You learned that properly edited resumes are necessary for making a good impression on a university or a potential employer. Dis
Daniel [21]

Answer:

it will not be a good impression and it will be hard to look for a job

Explanation:

3 0
3 years ago
.When a design begins with a consideration of what the systemmust accomplish, it is called:
iris [78.8K]

Answer: D) Task-centered design

Explanation: Task centered design is the technique for a design to made in such a way that it can have the desired or expected result . The goals are set in it and the task is decided in a particular structure. Thus a design having any such system , it is known as task centered design. It is mainly focused on the user and the way this design can be used by them.

3 0
3 years ago
Which graphic design tool should you use to achieve the effect in the image shown here?
Minchanka [31]

what are you looking for to crop the picture to make it smaller?

Explanation:

3 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following can indicate what careers will be enjoyable ?
    5·1 answer
  • Wouldn’t it be nice if whenever we messed up our life we could simply press ‘Ctrl Alt Delete’ and start all over?
    14·2 answers
  • A) A cable that is mainly used in the cable television network
    11·1 answer
  • How does form get its power natural gas
    14·1 answer
  • What is a piece of information sent to a function
    15·1 answer
  • Memes are life dont delete if u do then u know im right
    12·2 answers
  • Which function will show 6 as the answer in the following formula<br><br> =_ (36)
    10·1 answer
  • which of the following is a likely problem for a driver in an urban area? A. fame animals on the roads B.not finding a gas stati
    6·1 answer
  • I can talk to you! How about we talk through the you know where people comment and say stuff about the question1
    10·2 answers
  • When a ____________ file is opened, it appears full-screen, in slideshow mode, rather than in edit mode.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!