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
BabaBlast [244]
2 years ago
6

// This pseudocode segment is intended to compute the number

Computers and Technology
1 answer:
Harlamova29_29 [7]2 years ago
4 0

DEBUG01-01

//This pseudocode is intended to describe

//computing the price of an item on sale for 10% off

START

  input origPrice

  discount = origPrice * 0.10

  finalPrice = origPrice - discount

  output finalPrice

STOP

DEBUG01-02

//This pseudocode is intended to compute the number

//of miles per gallon you get with your automobile.

START

  input milesTraveled

  input gallonsOfGasUsed

  milesPerGallon = milesTraveled / gallonsOfGasUsed

     //milesPerGallon is computed using division

  output milesPerGallon

     //miles is misspelled, and the P in milesPerGallon should be uppercase

STOP

  //Program should end with stop

DEBUG01-03

//This pseudocode is intended to describe

//computing the per day cost of your rent

//in a 30-day month

START

  input rent

  costPerDay = rent / 30

     // Comment indicates 30-day month

  output costPerDay

     // output should be costPerDay

STOP

<h3>What is an algorithm?</h3>

An algorithm can be defined as a standard formula which comprises a set of finite steps and instructions that must be executed by a software program, in order to proffer solutions to a problem on a computer, under appropriate conditions.

         

<h3>What is a pseudocode?</h3>

A pseudocode can be defined as a description of the steps that are contained in an algorithm, especially through the use of a plain (natural) language.

<u>Note:</u> The indentation may change due to Brainly's text editor.

Read more on pseudocode here: brainly.com/question/13208346

#SPJ1

<u>Complete Question:</u>

Your downloadable files for Chapter 1 include DEBUG01-01.txt, DEBUG01-02.txt, and DEBUG01-03.txt. Each file starts with some comments (lines that begin with two slashes) that describe the program. Examine the pseudocode that follows the introductory comments, then find and correct all the bugs.

You might be interested in
The elements in a long array of integers are roughly sorted in decreasing order. No more than 5 percent of the elements are out
USPshnik [31]

Question Completion with Options:

a. Ill only.

b. I only.

c. II and III only.

d. I and II only.

e. Il only

f. I and Ill only.

Answer:

The best method to use to sort the array in descending order is:

e. Il only

Explanation:

The Merge Sort is similar to the Insertion Sort but, it is better with its sorting versatility.  It repeatedly breaks down a list into several sub-lists until each sub-list consists of a single element and then, merging the sub-lists in a manner that results in a sorted list.  The Merge Sort has been described as a "divide and conquer" technique because of how it splits a list into equal halves before combining them into a sorted whole.

8 0
3 years ago
__________ is a protocol used by e-mail clients to download e-mails to your computer.
arlik [135]
POP is a protocol used by e-mail clients to download e-mails to your computer. The correct option among all the options that are given in the question is the last option or option "d". The full form of POP is Post Office Protocol. After the email has been downloaded, the email gets erased from the server automatically.
7 0
4 years ago
n a particular board game, there is exactly one row and it comprises N spaces, numbered 0 through N - 1 from left to right. Ther
Ganezh [65]

Answer:

class MarblesBoard(object):

   def __init__(self, seq):

        self.seq = list(seq)

   def switch(self):

       temp = self.seq[0]

       self.seq[0] = self.seq[1]

       self.seq[1] = temp

   def rotate(self):

       temp = self.seq[0]

       for i in range(1, len(self.seq)):

           self.seq[i-1] = self.seq[i]

       self.seq[-1] = temp

   def is_solved(self):

       for i in range(len(self.seq)):

           if i != self.seq[i]:

               return False

       return True

   def __str__(self):  

       return ' '.join(list(map(str,self.seq)))

   def __repr__(self):

       return ' '.join(list(map(str,self.seq)))

class Solver(object):  

   def __init__(self, board):

       self.board = board

   def solve(self):      

       steps = 0

       while not self.board.is_solved():        

           if self.board.seq[0] > self.board.seq[1] and self.board.seq[0] != len(self.board.seq) - 1:

               self.board.switch()

           else:

               self.board.rotate()

           print(self.board)

           steps += 1

       print('Total steps:', steps)

Explanation:

The Python class MarblesBoard creates an object of the board game used in the Solver class object instance and it holds data or attributes of the player piece movement and the magic methods (__str__ and __repr__). The Solver object gets the switch and rotate movementt of the player and displays the total steps at the end of the game.

3 0
3 years ago
How do I close the file so I can delete it ? Since it's open in another program
Luba_88 [7]
One way is to use task manager (ctrl alt del) then force close it by right clikgin and clicking 'end program' or 'clos program' or smething like that
7 0
4 years ago
Business process re-engineering
Lorico [155]

Answer:

d. asks you to rethink the way you are doing your work.

Explanation:

A business strategy generally sets the overall direction for a business and as it focuses on defining how a business would achieve its goals, objectives, and mission; as well as the funds and material resources required to implement or execute the business plan.

Business process re-engineering can be defined as a strategic technique which typically involves being innovative while discarding old business processes, procedures and ideas in order to achieve maximum level of success.

Hence, business process re-engineering asks you to rethink the way you are doing your work.

For example, if you use manual labor for the production of your goods but then decided to start using automated machines for the production and packaging of your products. .

8 0
3 years ago
Other questions:
  • After an extruded feature has been created, you can always go back and edit the feature. When you edit an existing extrude featu
    11·1 answer
  • The conceptual phase of any system or just the software facet of a system best describes the sdlc
    9·1 answer
  • REEEEEEE I STILL NEED MORE AESTHETIC USERNAMES TO GO OFF OF PWEASE HELP IMA HAVE A PANIC ATTACK!!!... next post ima do a vote :&
    13·1 answer
  • If you see an icon in a document preset that looks like a tiny web browser window, what type of document is the preset meant to
    13·1 answer
  • What is the definition of delimited text?
    14·2 answers
  • . A program will ""fall through"" a case section if it is missing the __________ statement.
    15·1 answer
  • How do you make computers or microwaves?
    13·1 answer
  • There are some processes that need to be executed. Amount of a load that process causes on a server that runs it, is being repre
    7·1 answer
  • Examples of websites that use . com
    10·1 answer
  • which filename refers to a 16-bit real-mode program that queries the system for device and configuration data, and then passes i
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!