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
Many people use relative location on a daily basis by using __________. A.
kkurt [141]
Many people use relative location on a daily basis by using B) their mental maps of an area.
You know what a certain area looks like, at least approximately, so you don't need to use these other options on a day to day basis. You can rely on your mental maps to do the work for you.
6 0
3 years ago
Your manager asks you to calculate the sale price if the product is marked down 20 percent. You enter the original price in cell
padilas [110]
The answer is =A2*.80
7 0
4 years ago
Read 2 more answers
Match each option to the description of the task it accomplishes.
muminat

Answer:

Follows are the solution to the given question:

Explanation:

Please find the attached file of the matching.

Arrange: In shape formatting, the "arrange" is used to provide an arrangement in the positing of the shape on the given slide.

shape styles: In shape formatting, it is used for applying a new design to the shape.

size: In shape formatting, the size is used for modifying the shape.

insert shapes: In shape formatting, the insert shape is used to add a new shape.

Wordart styles: In shape formatting, Wordart is used to provide a text design on the shape.

5 0
3 years ago
You may declare an unlimited number of variables in a statement as long as the variables are ____.
k0ka [10]

Answer:

b. the same data type

Explanation:

Any number of variables can be declared in a statement as long as the variables have the same data type. For example:

1) int a,b,c,d,e;

Here each of the declared variables a,b,c,d,e have the type int.

2) char p,q,r,s,t,u,v,w;

In this case variables p to w all have the type char.

3) float x,y,z;

x,y and z are all of type float.

6 0
4 years ago
A victimless crime is committed when
Ksju [112]
Someone downloads a pirated song or video a copyrighted image is used without permission and a person downloads and uses pirated software.
3 0
2 years ago
Other questions:
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    6·1 answer
  • Which troubleshooting tool enables you to connect to a user's remote computer, view and interact with the user's screen, and cha
    8·1 answer
  • ROM is designed for _________
    6·1 answer
  • The Internet is considered a WAN. *<br><br> True<br> False
    9·1 answer
  • Write a program that accepts a time as an hour and minute. Add 15 minutes to the time
    14·1 answer
  • Why is a high-quality bond typically considered a lower-risk investment than a stock
    10·2 answers
  • In black and white,<br><br> we must be more conscious of image
    11·1 answer
  • Write the method addItemToStock to add an item into the grocery stock array. The method will: • Insert the item with itemName ad
    12·1 answer
  • E-mail has made it very easy to send a message to more than one person at any time of day from just about anywhere. If you wante
    7·1 answer
  • A pedometer treats walking 2,000 steps as walking 1 mile. Write a program whose input is the number of steps, and whose output i
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!