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
Arlecino [84]
2 years ago
7

// This pseudocode segment is intended to compute and display

Computers and Technology
1 answer:
Finger [1]2 years ago
3 0

The pseudocode to calculate the average of the test scores until the user enters a negative input serves as a prototype of the actual program

<h3>The errors in the pseudocode</h3>

The errors in the pseudocode include:

  • Inclusion of unusable segments
  • Incorrect variables
  • Incorrect loops

<h3>The correct pseudocode</h3>

The correct pseudocode where all errors are corrected and the unusable segments are removed is as follows:

start

Declarations

     num test1

     num test2

     num test3

     num average

output "Enter score for test 1 or a negative number to quit"

input test1

while test1 >= 0

     output "Enter score for test 2"

     input test2

     output "Enter score for test 3"

     input test3

     average = (test1 + test2 + test3) / 3

     output "Average is ", average

     output "Enter score for test 1 or a negative number to quit"

     input test1

endwhile

output "End of program"

stop

Read more about pseudocodes at:

brainly.com/question/11623795

You might be interested in
Question 3 (8 marks): Write a program that takes a string from the user and splits it into a list using a space (" ") as the del
bonufazy [111]

Answer:

In Python:

mystr = input("Sentence: ")

mylist = []

word = ""

for i in range(len(mystr)):

   if not i == len(mystr)-1:

       if not mystr[i] == " ":

           word+=mystr[i]

       else:

           mylist.append(word)

           word = ""

   else:

       word+=mystr[i]

       mylist.append(word)

print(mylist)

Explanation:

Prompt the user for an input sentence

mystr = input("Sentence: ")

Initialize an empty list

mylist = []

Initialize each word to an empty string

word = ""

Iterates through the input sentence

for i in range(len(mystr)):

If index is not the last, the following if condition is executed

   if not i == len(mystr)-1:

If the current character is not space

       if not mystr[i] == " ":

Append the character to word

           word+=mystr[i]

If otherwise

       else:

Append word to the list

           mylist.append(word)

Set word to an empty string

           word = ""

If otherwise; i.e. If index is not the last

   else:

Append the last character to word

       word+=mystr[i]

Append word to the list

       mylist.append(word)

Print the list

print(mylist)

5 0
3 years ago
I just downloaded an update for my laptop. Now, it doesn't give me a notification when the battery is low, and it just shuts off
givi [52]
Have you tried resetting it on your own first ? Although, it could just be a bug from this update (being something you can't solve until the next one) But you can try resetting it, or going to settings and clicking on battey, maybe the update turned that off ? Sometimes they do that, too! I hope all is well. ((:
7 0
3 years ago
Simple mail transfer protocol (smtp) uses the well-known port number ______________ by default.
Elden [556K]
I believe it's default is port 587. 
8 0
4 years ago
Read 2 more answers
What happens when two computers use the same IP address?
OLga [1]

Two computers can safely have the same IP address in certain cases. In most cases, if those two computers are on the same local network, it breaks connectivity for one or both of them. Internet protocols work by sending small, individually addressed messages. Each message can be routed differently.

I hope this helps you.

6 0
3 years ago
Print "Censored" if userInput contains the word "darn", else print userInput. End with newline. Ex: If userInput is "That darn c
Alisiya [41]

Answer:

The Java code is given below

Explanation:

import java.util.*;

public class CensoredWords {

public static void main(String args[]) {

Scanner scnr=new Scanner(System.in);

String userInput;

System.out.println("Enter String: ");

userInput=scnr.nextLine();

int res=userInput.indexOf("darn");

if(res == - 1) {

System.out.println(userInput);

} else {

System.out.println("Censored");

}

}

}

8 0
3 years ago
Other questions:
  • Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to
    5·1 answer
  • Common input devices include the keyboard, ____, and integrated video cameras.
    12·1 answer
  • Each brochure template produces _____ pages of graphics, business information text boxes, and story boxes.
    15·1 answer
  • Which of the following is the best subject line for an e-mail sent to co-workers about rescheduling a team meeting? A. Reschedul
    12·2 answers
  • By default, server manager does not connect with down-level servers (for example, windows server 2008). what must be done to pro
    13·1 answer
  • Which kind of system software tells the computer how to communicate with peripherals, such as a prero
    6·2 answers
  • A bagel shop has two locations, one campus location and one downtown location. A random sample of 40 customers at the campus loc
    13·1 answer
  • Why might you use the More button in the Find and Replace dialog box?
    10·1 answer
  • When creating a report,you can mske groups and subgroups by?​
    5·1 answer
  • TensorFlow and Pytorch are examples of which type of machine learning platform?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!