answer.
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
mixas84 [53]
2 years ago
15

Find the error in the following pseudocode.

Computers and Technology
1 answer:
Ber [7]2 years ago
5 0

Answer:

Following are the error in the given program are explain in the explanation part .

Explanation:

The main() function call the function getMileage() function after that the control moves to the getMileage() definition of function. In this firstly declared the  "mileage" variable after that it taking the input and module is finished we see that the "mileage" variable is local variable i,e it is declared inside the  " Module getMileage() "  and we prints in the main module that are not possible to correct these we used two technique.

Technique 1: Declared the mileage variable as the global variable that is accessible anywhere in the program.

Technique 2: We print the value of  "mileage" inside the Module getMileage() in the program .

You might be interested in
Clunker Motors Inc. is recalling all vehicles from model years 1995-1998 and 2004-2006. A boolean variable named recalled has be
AlekseyPX

Answer:

boolean recalled;

((modelYear>=1995 && modelYear <=1998) || (modelYear>=2004 && modelYear<=2006)) ? recalled =true : recalled =false;

Explanation:

In the first line of the code we declare the variable of type boolean (values can only be true or false) then using the conditional expression operator (ternary operator) in place of an if statement, We state the conditions of the years that will return true and vice versa

3 0
2 years ago
5. Assume a computer has a physical memory organized into 64-bit words. Give the word address and offset within the word for eac
spin [16.1K]

Answer:

see explaination and attachment

Explanation:

5.

To convert any byte address, By, to word address, Wo, first divide By by No, the no. of bytes/word, and ignores the remainder. To calculate a byte offset, O, in word, calculate the remainder of By divided by No.

i) 0 : word address = 0/8 = 0 and offset, O = 0 mod 8 = 0

ii) 9 : word address = 9/8 = 1 and offset, O = 9 mod 8 = 1

iii) 27 : word address = 27/8 = 3 and offset, O = 27 mod 8 = 3

iv) 31 : word address = 31/8 = 3 and offset, O = 31 mod 8 = 7

v) 120 : word address = 120/8 = 15 and offset, O = 120 mod 8 = 0

vi) 256 :word address = 256/8 = 32 and offset, O = 256 mod 8 = 0

6. see attachment for the python programming screen shot and output

4 0
2 years ago
Give the logical function for the following: If cell B7 equals 12, check contents of cell B10. If cell B10 is 10, then the value
ASHA 777 [7]

Answer:

=IF( B7 = 12, ( IF( B10 = 10,"YES", "")), 7) and PRESS ENTER

Explanation:

the above logical if function checks the following

-IF cell B7 is 12, if true, check the value of cell B10, IF cell B10 contains 10 the function should produce YES as output to whatever cell selected, IF B10 is not 10 output of the function should be an empty string, IF B7 is not equal to 12 the the output of the function should be 7.

5 0
2 years ago
According to the book, if your CPU usage levels are greater than ________ during most of your work session, a faster CPU can gre
Zanzabum

Answer:

90%

Explanation:

3 0
2 years ago
List at least three kinds of harms that a company could encounter from lost of service, that is, failure of availability. List t
WINSTONCH [101]

Answer:PART A

(1) Virus attack

(2) Fraud achieved by manipulating records by hackers

(3) Intellectual property theft.

PART B

COMPUTER SYSTEM

PART C

It will hurt the company in the following ways

(1) Loss business opportunities

(2) Increase in cost of operation as it will result in making certain expenses for it to be restored

(3) Loss of work time.

Explanation: Harm is any unanticipated eventualities that are capable of adversely affecting a person or an organisation. Harm can be as a result of theft or loss of certain resources which includes the COMPUTER SYSTEM.

When this loss takes place it can lead to Virus attack,fraud can be achieved by harkers through the manipulation of records, intellectual property theft.

THROUGH THIS HARM THE COMPANY WILL LOSS WORK TIME, LOSS SOME AMOUNT OF MONEY AND SOME BUSINESS OPPORTUNITIES.

5 0
2 years ago
Other questions:
  • Each of these is a basic type of a touch screen, except ________.
    10·2 answers
  • Witch printer covers a large range of colors than any other printer does
    15·2 answers
  • "Suppose there is a class Alarm. Alarm has two class variables, code which contains a String value representing the code that de
    10·1 answer
  • Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for the given prog
    9·1 answer
  • What kinds of unstructured data or big data might the BITS corporation want to gather in the future? What kind of devices might
    14·1 answer
  • 3) 5, 10, 15, 20 are items of data. Explain how these could become information and what knowledge
    10·1 answer
  • Design a program that asks the user for a series of names (in no particular order). After the final person’s name has been enter
    5·1 answer
  • Assume that machines A and B are on the same network 10.3.2.0/24. Machine A sends out spoofed packets, and Machine B tries to sn
    14·1 answer
  • What web 2.0 features allows users to subscribe to a data plan that charges for the amount of time spent on the internet?
    9·1 answer
  • An online retailer is looking to implement an enterprise platform. Which component of the enterprise platform will help the comp
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!