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
Eduardwww [97]
4 years ago
13

Write a program that loops one thousand times. add all the even numbers and display the results. add all the odd numbers and dis

play the results.
Computers and Technology
1 answer:
tekilochka [14]4 years ago
5 0
# Python v3

odd = 0
even = 0

for i in range( 1000 ): # Note: zero indexed!
    if( i % 2 ):
        even += i
    else:
        odd += i

print( "The even numbers add up to %d" % even )
print( "The odd numbers add up to %d" % odd )
You might be interested in
The following algorithm adds all the entries in a square n × n array A. Analyze this algorithm where the work unit is the additi
wlad13 [49]

Answer:

T(n)=n(n+1)/2

Explanation:

See the attached picture for detailed explanation.

6 0
4 years ago
Anyone have Y.O.U.T.U.B.E or S.O.U.N.D.C.L.O.U.D. I need help putting my music and videos out there
kiruha [24]

Answer:

I do have Y.O.U.T.U.B.E.

Explanation:

1. Go on Y.O.U.T.U.B.E app.

2. Create account or log in to an existing account.

3. In the welcome screen, click the button of a camera on the top right corner next to your photo icon.

4. Click "Upload Video"

5. Then upload your video.

6. Add a description and details

7. Done! Just upload to on Y.O.U.T.U.B.E.

I hope this helps! Thank you:)

5 0
4 years ago
AN OBSTACLE OR BARRIER THAT MAY PREVENT YOU FROM ACCOMPLISHING YOUR GOAL IS:
marishachu [46]
Depends on what kind of goal.
If I gave a goal of eating 8 hot dogs then a barrier would be a physical will of your body to not eat more. It would be a limit your body can take so it’s different from a mental or other barrier.
If you wanted to cross an area of land but there is a fence in the way then that’s another type of barrier.
Or there are mental barriers. If you wanted to ask someone out to prom, you may be stopped by a mental barrier of self hatred. Feeling like you’re not good enough.

Hopefully this helps!
5 0
4 years ago
Which of the following application architecture do you suggest as the best option for email for an organization? Consider small,
kykrilka [37]

Which of the following application architecture do you suggest as the best option for email for an organization? Consider small, medium and large organizations to provide your suggestions.

1. Two-tier client-server

2. web-based

Answer:

2. Web based

Explanation:

Web based applications provides cloud based email solutions provider that benefits small organisation as much as big organisations because the investment is minimal and affordable and gives no problem in deployment of resources to manage services with no risk.

It provides multiple point access by providing email solutions that enables multiple point of access gives rise to flexibility of access by members of the organisation.

It provides powerful admin control which makes management of email services easy and provides high security for services.

8 0
4 years ago
Which of the following are actions a programmer could take when debugging a segment of code that would most likely lead to findi
Verizon [17]

Answer:

Option B and C are the correct answer for the above question

Explanation:

The above question asked about the work of the programmer to catch an error of the program--

  • Then the option B states that the programmer needs to prints the value of the various program variable on every line of the program which is the correct solution because it is used to find the error easily. It defines the value of every variable in every place of the program and the programmer caught the error statement in the program if anywhere the variable gets the false value.
  • The C option states to help from a friend, it is also a good solution because the friend can easily be caught the error of the program by seeing every line of code.
  • But the other option is not correct because the option A states that the change the name of the variable which is not a result of anything.
  • And the option D states that the code will be retyped again which is also not justify anything.

6 0
3 years ago
Other questions:
  • Software used the control a computer's hardware
    14·1 answer
  • Convert A4B from hexadecimal to binary. Show your work.
    11·1 answer
  • Skinner designed a soundproof apparatus, often equipped with a lever or bar, with which he conducted his experiments in operant
    9·1 answer
  • To begin importing data from an excel spreadsheet, click on the ____ tab on the ribbon.
    11·1 answer
  • What is the best way to improve the following code fragment? if ((counter % 10) == 0) { System.out.println("Counter is divisible
    13·1 answer
  • How does Taylorism (scientific management used to streamline mass production) resemble a bureaucracy? Select one: a. Routinizati
    5·1 answer
  • Is Wikipedia or a .gov website with more information about the subject not a good enough explanation not a good explanation for
    7·1 answer
  • How can you identify the active cell in excel
    8·1 answer
  • 1
    7·1 answer
  • A firm uses BitLocker for volume encryption. Normally, BitLocker performs its task well. However, an administrator was recently
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!