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
Andrews [41]
3 years ago
10

Find the error in the following pseudocode. Module main () Call raiseToPower (2, 1.5) End Module Module raiseToPower (Real value

, Integer power) Declare Real result Set result=value^power Display result End Module
Computers and Technology
1 answer:
Nataliya [291]3 years ago
8 0

Answer:

Call raiseToPower (2, 1.5) '

or

raiseToPower (Real value, Integer power)

Explanation:

To solve this, first organize the pseudo code,

1) main ()

2) Call raiseToPower (2, 1.5)

3) End Module

4) Module

5) raiseToPower (Real value, Integer power)

6) Declare Real result

7) Set result=value^power

8) Display result

9) End Module

The first three lines in pseudo code are representing the main module. While lines 4-9 shows the definition of module that is being called in main function.  

If we look at the raiseToPower definition at line5, we can see that it is requiring any real value for the base number. However, for power, it defines only integers.

But, in the main function, 1.5 is placed as a power that is not an integer. Therefore, this is the error in pseudo code. It should be changed to any integer.

Alternatively, change the integer power to real power to avoid this error.

You might be interested in
What is statement used to communicate ones feelings in a nonconfrontational manner
makkiz [27]

"I am" statements are very well to communicate with people about your feelings in a non confrontational manner.


6 0
3 years ago
Draw the hierarchy chart and then plan the logic for a program that calculates a person’s body mass index (BMI).
dusya [7]

Explanation:

I have attached the answer as an image. I can't upload the file as it requires a licensed product and I only used demo version. I can provide the file too if you can give me your vlsig file required to use full software. However, If you just copy along the images on your Visual Studio, you will easily create the files yourself. Answer is provided for both scenarios as part A and part B, one which stops after 1 iteration and the one which loops until 0 height is given.

8 0
3 years ago
Ed-Only g - Last Modified: November 2 -
valina [46]

Answer:

Could u state this more clearly

Explanation:

6 0
3 years ago
How to write a program to draw 1000 random points on a frame in python language for coding?
harina [27]

Answer:

You could generate random numbers between the pixel amount of the height and width than place the dots at those random points

Explanation:

Do you need the code or can you make it using my "headstart"

8 0
3 years ago
An inserted graphic in Excel is
telo118 [61]
<h2>Answer:</h2>

<u>An inserted graphic in Excel is </u><u>B. inserted in the active cell.</u>

<h2>Explanation:</h2>

A graphic is considered as any picture or shape present in the directory of any computer. So when you are working in an Excel worksheet and you insert any graphic so it means you have inserted a shape. It may be a line, picture or any other geometrical shape, then this image or graphic will be inserted in the cell which is active at that time and no where else. Therefore option B is the correct answer.

7 0
4 years ago
Read 2 more answers
Other questions:
  • Horses developed longer legs over time in response to pressure from predators that they needed to outrun to survive.
    10·1 answer
  • If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?
    13·2 answers
  • Ipv6 includes a native information security framework (ipsec) that provides both data and control packets. true false
    15·1 answer
  • 80 points two simple computer questions
    13·2 answers
  • - The concept of communication competence suggests there is no single "ideal" or "effective" way to communicate in every situati
    6·2 answers
  • If i were to give you free points woulld you take them?
    14·2 answers
  • Which pair of features is relevant when buying a pc?
    9·2 answers
  • If you have 60fps on your laptop tell me one way you can go to 240fps
    14·2 answers
  • A sample member of the list data is a1 = ['male', True] where the second item is True if the person is on the phone.
    15·2 answers
  • Majken is turning 18 years old soon and wants to calculate how many seconds she will have been alive.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!