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]
3 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]3 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
If you Buy my group clothing in R.o.b.l.o.x for a donation i will make you brainliest
erastova [34]

Answer:kk ima do it

Explanation:

7 0
3 years ago
Read 2 more answers
What are some options available in the Spelling and Grammar Checker in word?
denpristay [2]
Some options are add to dictionary, ignore once, ignore all, autocorrect, change, and change all.
6 0
3 years ago
Write the following numbers in binary. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25
AfilCa [17]
0 1 10 11
Explanaition:
4 0
2 years ago
____ is a philosophy and a software and system development methodology that focuses on the development, use, and reuse of small,
LiRa [457]

Answer:

d.) Service-Oriented Architecture

Explanation:

Because its definition matches

4 0
3 years ago
When a program terminates because a thrown exception is not handled, the program:
castortr0y [4]

Answer:

Option (e)

Explanation:

Option (e) is the answer. It indicates the exception thrown and displays it. It also indicates the place where the exception was thrown ( at what line of the code the exception was thrown )

Option (a) is false as the program which was terminated because of an exception which was not handled doesn't starts automatically.

Option (b) is false as it doesn't opens a dialogue box about running the program another time or anything. It just terminates because of the unhandled exception.

Option (c) is false as it doesn't saves all the output to a disk file called the "runStackTrace.txt".

Option (d) is false as it doesn't open a dialogue box. The program terminates because of the unhandled exception.

4 0
3 years ago
Other questions:
  • Being able to express your thoughts in an email is a primary technology skill. True or False
    8·2 answers
  • Discuss two advantages and two disadvantages of agile methods.
    6·1 answer
  • The device used to connect a network to the internet is called a
    7·1 answer
  • True / False
    6·1 answer
  • What are the defenses to protect against these attacks?
    13·1 answer
  • Coal, nuclear and natural gas power plants all transform thermal energy into electricity
    14·2 answers
  • What is the best approach to testing a website? visit all pages to verify that they load visit every page and verify all links v
    7·1 answer
  • Will this website ever get itself together to stop people from sending links?
    9·1 answer
  • Phân tích cạnh tranh của cocacola và pepsi
    5·1 answer
  • 7. A(n) is the address of a document or other file accessible on the Internet.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!