Computer the value of the given number

Assignment Help Basic Computer Science
Reference no: EM13234449

Prompt the user for a number and an exponent. Computer the value of the given number (the base) raised to the power of the exponent. (For example, the number two raised to the fourth power is 16.) Their suggested correct answer: Get base Get exponent Set i to 1 Set answer to 1 While (i <= exponent) Set answer = answer x base Add 1 to i End loop Print answer Ok my problem... Set answer = answer x base if answer is 1 then we get base as answer every time in this loop for all values of i, as long as, i is equal to or smaller than 1. This does not express an exponential situation or value as asked for in the prompt. What am I not understanding or getting here?

Reference no: EM13234449

Questions Cloud

Define the electron transport chain : In the electron transport chain, electrons from FADH2 are eventually used to reduce O2 into H2O. Experimentally, the proton motive force created by this process will generate 2 ATP molecules from ADP and Pi, using ATP synthase.
Which of the following is most correct : Bob has always performed well and has an excellent track record with the company. He and Arnold do not have any type of employment contract - they've just worked together for the last 30 years.
Explain how the new entrant acts first : Suppose that an industry cartel wishes to keep a new entrant out of an industry. Cartel members can conduct "predatory pricing", where the cartel lowers its price until the entrant leaves, after which it returns it price to the cartel's optimal (m..
Describe electrolysis continue to produce 0.50 g of copper : Electrolysis of a solution of CuSO4(aq) to give copper metal is carried using a current of 0.66 A. How long should electrolysis continue to produce 0.50 g of copper
Computer the value of the given number : Prompt the user for a number and an exponent. Computer the value of the given number (the base) raised to the power of the exponent.
Explain the same density and specific heat as water : If the solution has the same density and specific heat as water, what is ?H for this reaction (per mole of H2O produced)? Assume that the total volume is the sum of the individual volumes. Find kJ/mol of H20
Determine what is the equilibrium price and quantity : Research suggests that taxing pizza and soda would reduce the incidence of obesity in the U.S.A. Suppose you were required to choose between a price ceiling and a floor price to achieve the same result.
Describe the problem of genocide in the 20th century : Describe the problem of genocide in the 20th century. Include a description of the each of the three cases studies of genocide examined in lecture, their commonalities and contrasts, and how they each evidence some of the elements of 20th century glo..
Determine the density : Assume that there is a very beautiful ornate crown, supposedly made of solid gold, how would you determine its density

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd