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
bezimeni [28]
3 years ago
13

Write a program that will add up the series of numbers: 99, 98, 97… 3, 2, 1. The program should print the running total as well

as the total at the end. The program should use one for loop, the range() function and one print() command.
Python please.
Computers and Technology
1 answer:
Elanso [62]3 years ago
4 0

Answer:

a = 99

b = 99

while(a > 0):

    b += a

    print(b)

    a -= 1

Explanation:

You might be interested in
Select the correct answer. Nancy has made a small web page with the new features of HTML5. She has to show this web page in scho
Tasya [4]

Answer:

IE 10

Explanation:

It is the newest version in the list of options

8 0
3 years ago
Which procedure is recommended when cleaning inside a computer? Clean the hard drive heads with a cotton swab. Hold the CPU fan
ddd [48]

Answer:

Hold the CPU fan so that it won't spin and blow this with compressed air.

Explanation:

While cleaning the computer system from the inner side then we have to follow some steps.

  • Firstly, shut down the system properly and remove it from the power supply.
  • Then, open the cabinet of the computer system.
  • Then, clean the internal parts of the system through simple air pressure and hold the CPU fan during that time to avoid spinning.
  • Clear the dirt layer using the can of compressed air over the cabinet fans.
8 0
3 years ago
Give a pseudo-code description of the O(n)-time algorithm for computing the power function p(x,n).Also draw the trace of computi
laila [671]

Answer:

p(x,n)

1. if(n==0)    [if power is 0]

2.    then result =1.

3.else

4. {    result=1.

5.      for i=1 to n.

6.          {  result = result * x. }  [each time we multiply x once]

7.       return result.

8.  }

Let's count p(3,3)

3\neq0, so come to else part.

i=1: result = result *3 = 3

i=2: result = result *3 = 9

i=2: result = result *3 = 27

Explanation:

here the for loop at step 4 takes O(n) time and other steps take constant time. So overall time complexity = O(n)

6 0
4 years ago
I have been working on this python program for a hour now, and I am trying to figure out what I an doing wrong in the loop. I ha
Alona [7]

Answer:

The correct loop is as follows:

for year in range(starting_tuitionYear, ending_tuitionYear, increment):

   tuition = startingTuition + rate * startingTuition

   startingTuition = tuition

   print('Tuition for the year of ' + str(year)+ ' is ' + str(tuition));

Explanation:

Required

The correction to the attached program

Some variables are not needed; so, I've removed the redundant variables.

The main error in the program is in the loop;

After the tuition for each year has been calculated, the startTuition of the next year must be set to the current tuition

<em>See attachment for complete program</em>

7 0
3 years ago
________ are devices in a computer that are in either the on or off state
Vanyuwa [196]
The appropriate response is Electrical Switches. These are electromechanical gadgets that are utilized as a part of electrical circuits to control, recognize when frameworks are outside their working reaches, flag controllers of the whereabouts of machine individuals and work pieces, give a way to manual control of machine and process capacities, control lighting, et cetera.
6 0
4 years ago
Other questions:
  • With a _____ network connection, the computers and other devices on the network are physically connected via cabling to the netw
    10·2 answers
  • What is the acronym for computerized command provides weather by microphone clicks?
    8·1 answer
  • Write a C# solution for the following problem. Submit your .cs file to this link. Sample output(s) attached. == Create an Employ
    5·1 answer
  • An aerophone is an instrument that causes ________ to vibrate, thus creating sound waves.
    11·2 answers
  • What are computer crimes?​
    14·1 answer
  • . List 5 types of exploits from cybercrime and provide brief definition. (2.5 Marks)
    5·1 answer
  • What is the build in libary function to compare two strings?​
    15·1 answer
  • Select the statement which most accurately describes the benefits and drawbacks of working from home and telecommuting.
    13·2 answers
  • Which of the following is the file type of Microsoft® Publisher files?
    12·2 answers
  • What ethical concerns might arise from applying new IT to law enforcement?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!